mirror of https://github.com/arendst/Tasmota.git
Merge pull request #11111 from pcdiem/dgr3
Check device range when SO88 enabled
This commit is contained in:
commit
861a8d5fff
|
@ -402,7 +402,7 @@ void SendReceiveDeviceGroupMessage(struct device_group * device_group, struct de
|
||||||
case DGR_ITEM_POWER:
|
case DGR_ITEM_POWER:
|
||||||
if (Settings.flag4.multiple_device_groups) { // SetOption88 - Enable relays in separate device groups
|
if (Settings.flag4.multiple_device_groups) { // SetOption88 - Enable relays in separate device groups
|
||||||
uint32_t device = Settings.device_group_tie[device_group_index];
|
uint32_t device = Settings.device_group_tie[device_group_index];
|
||||||
if (device) {
|
if (device && device <= TasmotaGlobal.devices_present) {
|
||||||
bool on = (value & 1);
|
bool on = (value & 1);
|
||||||
if (on != ((TasmotaGlobal.power >> (device - 1)) & 1)) ExecuteCommandPower(device, (on ? POWER_ON : POWER_OFF), SRC_REMOTE);
|
if (on != ((TasmotaGlobal.power >> (device - 1)) & 1)) ExecuteCommandPower(device, (on ? POWER_ON : POWER_OFF), SRC_REMOTE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue