Dont make HADiscovery switch if RF is receive only (#772)

This commit is contained in:
Jon authored and GitHub committed 2020-10-05 13:52:18 -05:00
1 parent 03ab7f7d0e
commit 20b728a773
1 file changed
+2 -2
+2 -2
View File
@@ -37,7 +37,7 @@
RCSwitch mySwitch = RCSwitch();
# ifdef ZmqttDiscovery
# if defined(ZmqttDiscovery) && !defined(RF_DISABLE_TRANSMIT)
void RFtoMQTTdiscovery(SIGNAL_SIZE_UL_ULL MQTTvalue) { //on the fly switch creation from received RF values
char val[11];
sprintf(val, "%lu", MQTTvalue);
@@ -90,7 +90,7 @@ void RFtoMQTT() {
mySwitch.resetAvailable();
if (!isAduplicateSignal(MQTTvalue) && MQTTvalue != 0) { // conditions to avoid duplications of RF -->MQTT
# ifdef ZmqttDiscovery //component creation for HA
# if defined(ZmqttDiscovery) && !defined(RF_DISABLE_TRANSMIT) //component creation for HA
RFtoMQTTdiscovery(MQTTvalue);
# endif
pub(subjectRFtoMQTT, RFdata);