Merge pull request #11111 from pcdiem/dgr3

Check device range when SO88 enabled
This commit is contained in:
Theo Arends 2021-02-24 10:26:51 +01:00 committed by GitHub
commit 861a8d5fff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);
}