Browse Source

domoticz: fix always true relay match condition

rules-rpn
Max Prokhorov 5 years ago
parent
commit
3018b9ffe7
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      code/espurna/domoticz.ino

+ 2
- 2
code/espurna/domoticz.ino View File

@ -17,7 +17,7 @@ std::vector<bool> _dcz_relay_state;
// Private methods
//------------------------------------------------------------------------------
unsigned char _domoticzRelay(unsigned int idx) {
int _domoticzRelay(unsigned int idx) {
for (unsigned char relayID=0; relayID<relayCount(); relayID++) {
if (domoticzIdx(relayID) == idx) {
return relayID;
@ -135,7 +135,7 @@ void _domoticzMqtt(unsigned int type, const char * topic, const char * payload)
}
#endif
unsigned char relayID = _domoticzRelay(idx);
int relayID = _domoticzRelay(idx);
if (relayID >= 0) {
unsigned char value = root["nvalue"];
DEBUG_MSG_P(PSTR("[DOMOTICZ] Received value %u for IDX %u\n"), value, idx);


Loading…
Cancel
Save