mirror of https://github.com/arendst/Tasmota.git
Only exec power cmd for local dev group
This commit is contained in:
parent
9b0fc0985b
commit
6b632ef280
|
@ -591,6 +591,7 @@ void ProcessDeviceGroupMessage(char * packet, int packet_length)
|
||||||
|
|
||||||
if (DeviceGroupItemShared(true, item)) {
|
if (DeviceGroupItemShared(true, item)) {
|
||||||
if (item == DGR_ITEM_POWER) {
|
if (item == DGR_ITEM_POWER) {
|
||||||
|
if (device_group->local) {
|
||||||
uint8_t mask_devices = value >> 24;
|
uint8_t mask_devices = value >> 24;
|
||||||
if (mask_devices > devices_present) mask_devices = devices_present;
|
if (mask_devices > devices_present) mask_devices = devices_present;
|
||||||
for (uint32_t i = 0; i < devices_present; i++) {
|
for (uint32_t i = 0; i < devices_present; i++) {
|
||||||
|
@ -599,6 +600,7 @@ void ProcessDeviceGroupMessage(char * packet, int packet_length)
|
||||||
if (on != (power & mask)) ExecuteCommandPower(i + 1, (on ? POWER_ON : POWER_OFF), SRC_REMOTE);
|
if (on != (power & mask)) ExecuteCommandPower(i + 1, (on ? POWER_ON : POWER_OFF), SRC_REMOTE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
XdrvCall(FUNC_DEVICE_GROUP_ITEM);
|
XdrvCall(FUNC_DEVICE_GROUP_ITEM);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue