Deactivate RF switch discovery per default (#1026)

* Deactivate RF switch discovery per default

To prevent creating many switches into Home Assistant
This commit is contained in:
Florian authored and GitHub committed 2021-07-17 17:18:53 -05:00
1 parent 379df34701
commit ff089923da
2 files changed
+3 -2

No files matched your search

+2 -2
View File
@@ -37,7 +37,7 @@
RCSwitch mySwitch = RCSwitch();
# if defined(ZmqttDiscovery) && !defined(RF_DISABLE_TRANSMIT)
# if defined(ZmqttDiscovery) && !defined(RF_DISABLE_TRANSMIT) && defined(RFmqttDiscovery)
void RFtoMQTTdiscovery(SIGNAL_SIZE_UL_ULL MQTTvalue) { //on the fly switch creation from received RF values
char val[11];
sprintf(val, "%lu", MQTTvalue);
@@ -98,7 +98,7 @@ void RFtoMQTT() {
mySwitch.resetAvailable();
if (!isAduplicateSignal(MQTTvalue) && MQTTvalue != 0) { // conditions to avoid duplications of RF -->MQTT
# if defined(ZmqttDiscovery) && !defined(RF_DISABLE_TRANSMIT) //component creation for HA
# if defined(ZmqttDiscovery) && !defined(RF_DISABLE_TRANSMIT) && defined(RFmqttDiscovery) //component creation for HA
if (disc)
RFtoMQTTdiscovery(MQTTvalue);
# endif