mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 04:36:31 +00:00
Fix Domoticz range check
This commit is contained in:
parent
82ccd7ed37
commit
33acbd1a8b
@ -110,7 +110,8 @@ void DomoticzUpdateFanState(void)
|
|||||||
void MqttPublishDomoticzPowerState(uint8_t device)
|
void MqttPublishDomoticzPowerState(uint8_t device)
|
||||||
{
|
{
|
||||||
if (Settings.flag.mqtt_enabled) { // SetOption3 - Enable MQTT
|
if (Settings.flag.mqtt_enabled) { // SetOption3 - Enable MQTT
|
||||||
if ((device < 1) || (device > devices_present) || (device > MAX_DOMOTICZ_IDX)) { device = 1; }
|
if (device < 1) { device = 1; }
|
||||||
|
if ((device > devices_present) || (device > MAX_DOMOTICZ_IDX)) { return; }
|
||||||
if (Settings.domoticz_relay_idx[device -1]) {
|
if (Settings.domoticz_relay_idx[device -1]) {
|
||||||
#ifdef USE_SHUTTER
|
#ifdef USE_SHUTTER
|
||||||
if (domoticz_is_shutter) {
|
if (domoticz_is_shutter) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user