mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-22 10:16:30 +00:00
Fix Domoticz compile error
Fix compile error when Domoticz is enabled but Lights is disabled
This commit is contained in:
parent
e903348a03
commit
9b758350b5
@ -296,6 +296,7 @@ bool DomoticzMqttData(void)
|
|||||||
found = true;
|
found = true;
|
||||||
} else
|
} else
|
||||||
#endif // USE_SHUTTER
|
#endif // USE_SHUTTER
|
||||||
|
#ifdef USE_LIGHT
|
||||||
if (iscolordimmer && 10 == nvalue) { // Color_SetColor
|
if (iscolordimmer && 10 == nvalue) { // Color_SetColor
|
||||||
// https://www.domoticz.com/wiki/Domoticz_API/JSON_URL%27s#Set_a_light_to_a_certain_color_or_color_temperature
|
// https://www.domoticz.com/wiki/Domoticz_API/JSON_URL%27s#Set_a_light_to_a_certain_color_or_color_temperature
|
||||||
JsonObject& color = domoticz["Color"];
|
JsonObject& color = domoticz["Color"];
|
||||||
@ -333,8 +334,9 @@ bool DomoticzMqttData(void)
|
|||||||
snprintf_P(XdrvMailbox.topic, XdrvMailbox.index, PSTR("/" D_CMND_DIMMER));
|
snprintf_P(XdrvMailbox.topic, XdrvMailbox.index, PSTR("/" D_CMND_DIMMER));
|
||||||
snprintf_P(XdrvMailbox.data, XdrvMailbox.data_len, PSTR("%d"), nvalue);
|
snprintf_P(XdrvMailbox.data, XdrvMailbox.data_len, PSTR("%d"), nvalue);
|
||||||
found = true;
|
found = true;
|
||||||
}
|
} else
|
||||||
else if (1 == nvalue || 0 == nvalue) {
|
#endif // USE_LIGHT
|
||||||
|
if (1 == nvalue || 0 == nvalue) {
|
||||||
if (((power >> i) &1) == (power_t)nvalue) {
|
if (((power >> i) &1) == (power_t)nvalue) {
|
||||||
return true; // Stop loop
|
return true; // Stop loop
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user