fix on/off map insertion

This commit is contained in:
Nicu Hodos 2024-05-04 16:17:43 +02:00
parent 7a6caf6afe
commit 18450a6883

View File

@ -36,8 +36,8 @@ struct EasyHomeSwitch : Switch {
memcpy(&this->off[4], off, 4 * sizeof(unsigned long));
asDevice((new DeviceConfig{id, name})->withManufacturer("Intertek")->withModel("Easy Home")->withParent(gatewayDevice));
for (int i = 0; i < 8; i++) {
onSwitches.insert({ on[i], this });
offSwitches.insert({ off[i], this });
onSwitches.insert({ this->on[i], this });
offSwitches.insert({ this->off[i], this });
}
}