From b718636eccbb44703eb0ee65a7a600a1f6c724bb Mon Sep 17 00:00:00 2001 From: Max Prokhorov Date: Thu, 13 Aug 2020 17:00:30 +0300 Subject: [PATCH] Fix unused vars As codacy points out, move stype and switchType to the LIGHT_PROVIDER != NONE block --- code/espurna/domoticz.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); }