From 0d19fd465441c0580261eb11d0a9ab1f87cce7ed Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Wed, 6 May 2020 17:23:14 +0200 Subject: [PATCH] Fix unwanted Domoticz messages Fix unwanted Domoticz messages (#8355) --- tasmota/xdrv_07_domoticz.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasmota/xdrv_07_domoticz.ino b/tasmota/xdrv_07_domoticz.ino index 4face9bfb..997905eff 100644 --- a/tasmota/xdrv_07_domoticz.ino +++ b/tasmota/xdrv_07_domoticz.ino @@ -110,7 +110,7 @@ void DomoticzUpdateFanState(void) void MqttPublishDomoticzPowerState(uint8_t device) { if (Settings.flag.mqtt_enabled) { // SetOption3 - Enable MQTT - if ((device < 1) || (device > devices_present)) { device = 1; } + if ((device < 1) || (device > devices_present) || (device > MAX_DOMOTICZ_IDX)) { device = 1; } if (Settings.domoticz_relay_idx[device -1]) { #ifdef USE_SHUTTER if (domoticz_is_shutter) {