Skip to content

Commit 63d96ee

Browse files
authored
Dont make HADiscovery switch if RF is receive only (1technophile#772)
1 parent 478afc3 commit 63d96ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main/ZgatewayRF.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
RCSwitch mySwitch = RCSwitch();
3939

40-
# ifdef ZmqttDiscovery
40+
# if defined(ZmqttDiscovery) && !defined(RF_DISABLE_TRANSMIT)
4141
void RFtoMQTTdiscovery(SIGNAL_SIZE_UL_ULL MQTTvalue) { //on the fly switch creation from received RF values
4242
char val[11];
4343
sprintf(val, "%lu", MQTTvalue);
@@ -90,7 +90,7 @@ void RFtoMQTT() {
9090
mySwitch.resetAvailable();
9191

9292
if (!isAduplicateSignal(MQTTvalue) && MQTTvalue != 0) { // conditions to avoid duplications of RF -->MQTT
93-
# ifdef ZmqttDiscovery //component creation for HA
93+
# if defined(ZmqttDiscovery) && !defined(RF_DISABLE_TRANSMIT) //component creation for HA
9494
RFtoMQTTdiscovery(MQTTvalue);
9595
# endif
9696
pub(subjectRFtoMQTT, RFdata);

0 commit comments

Comments
 (0)