Check device range when SO88 enabled

This commit is contained in:
Paul C Diem 2021-02-23 15:59:50 -06:00
parent 0855169c54
commit d0779d94a7
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}