diff --git a/code/espurna/domoticz.cpp b/code/espurna/domoticz.cpp index 7b8c26e9..8ab527d3 100644 --- a/code/espurna/domoticz.cpp +++ b/code/espurna/domoticz.cpp @@ -153,10 +153,10 @@ void _domoticzMqtt(unsigned int type, const char * topic, char * payload) { // IDX unsigned int idx = root["idx"]; - String stype = root["stype"]; - String switchType = root["switchType"]; #if LIGHT_PROVIDER != LIGHT_PROVIDER_NONE + String stype = root["stype"]; + String switchType = root["switchType"]; if ((_domoticzIdx(0) == idx) && (stype.startsWith("RGB") || (switchType.equals("Dimmer")))) { _domoticzLight(idx, root); }