diff --git a/tasmota/support_device_groups.ino b/tasmota/support_device_groups.ino index 44e0c5106..f85b801a5 100644 --- a/tasmota/support_device_groups.ino +++ b/tasmota/support_device_groups.ino @@ -402,7 +402,7 @@ void SendReceiveDeviceGroupMessage(struct device_group * device_group, struct de case DGR_ITEM_POWER: if (Settings.flag4.multiple_device_groups) { // SetOption88 - Enable relays in separate device groups uint32_t device = Settings.device_group_tie[device_group_index]; - if (device) { + if (device && device <= TasmotaGlobal.devices_present) { bool on = (value & 1); if (on != ((TasmotaGlobal.power >> (device - 1)) & 1)) ExecuteCommandPower(device, (on ? POWER_ON : POWER_OFF), SRC_REMOTE); }