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:
1 parent
379df34701
commit
ff089923da
2 files changed
+3
-2
No files matched your search
+2
-2
@@ -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
|
||||
|
||||
@@ -81,6 +81,7 @@ int minimumRssi = 0;
|
||||
//RF number of signal repetition - Can be overridden by specifying "repeat" in a JSON message.
|
||||
#define RF_EMITTER_REPEAT 20
|
||||
//#define RF_DISABLE_TRANSMIT //Uncomment this line to disable RF transmissions. (RF Receive will work as normal.)
|
||||
//#define RFmqttDiscovery true //uncomment this line so as to create a discovery switch for each RF signal received
|
||||
|
||||
/*-------------------RF2 topics & parameters----------------------*/
|
||||
//433Mhz newremoteswitch MQTT Subjects and keys
|
||||
|
||||
Reference in new issue
Block a user