This commit is contained in:
Koen Kanters 2021-07-01 19:59:52 +02:00
parent 234e39eaea
commit 1985e24517

View File

@ -235,11 +235,9 @@ class EntityPublish extends Extension {
const msg = result.state;
if (endpointName) {
for (const key of ['state', 'brightness', 'color', 'color_temp', 'color_mode']) {
if (msg.hasOwnProperty(key)) {
msg[`${key}_${endpointName}`] = msg[key];
delete msg[key];
}
for (const key of Object.keys(msg)) {
msg[`${key}_${endpointName}`] = msg[key];
delete msg[key];
}
}