mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-07-10 05:51:40 +00:00
Fix group publish on Node 10 (doesn't support Object.fromEntries). https://github.com/Koenkk/zigbee2mqtt/issues/9085
This commit is contained in:
@@ -140,9 +140,14 @@ export default class Publish extends Extension {
|
||||
const device = re instanceof Device ? re.zh : null;
|
||||
const entitySettings = re.settings;
|
||||
const entityState = this.state.get(re) || {};
|
||||
const membersState = re instanceof Group ?
|
||||
Object.fromEntries(re.zh.members.map((e) => [e.getDevice().ieeeAddr,
|
||||
this.state.get(this.zigbee.resolveEntity(e.getDevice().ieeeAddr))])) : null;
|
||||
const membersState: {[s: string]: KeyValue} = {};
|
||||
if (re.isGroup()) {
|
||||
re.zh.members.forEach((e) => {
|
||||
const device = e.getDevice();
|
||||
membersState[device.ieeeAddr] = this.state.get(this.zigbee.resolveEntity(e.getDevice().ieeeAddr));
|
||||
});
|
||||
}
|
||||
|
||||
let converters: zhc.ToZigbeeConverter[];
|
||||
{
|
||||
if (Array.isArray(definition)) {
|
||||
|
||||
Reference in New Issue
Block a user