Skip to content

Commit

Permalink
fix: Fix Cannot set properties of undefined (setting 'power')} for …
Browse files Browse the repository at this point in the history
…TuYa TS011F_plug_1 Koenkk/zigbee2mqtt#16709
  • Loading branch information
Koenkk authored and mikeodr committed Jan 2, 2024
1 parent 5d1d217 commit 6a03d6c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/devices/quotra.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const definitions: Definition[] = [
model: 'B07JHL6DRV',
vendor: 'Quotra',
description: 'RGB WW LED strip',
extend: [light({colorTemp: {range: [150, 500]}, color: true})],
extend: [light({colorTemp: {range: [150, 500]}, color: true, powerOnBehaviour: false})],
},
];

Expand Down
2 changes: 1 addition & 1 deletion src/devices/tuya.ts
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ const fzLocal = {
TS011F_electrical_measurement: {
...fz.electrical_measurement,
convert: async (model, msg, publish, options, meta) => {
const result = await fz.electrical_measurement.convert(model, msg, publish, options, meta);
const result = await fz.electrical_measurement.convert(model, msg, publish, options, meta) ?? {};
const lookup: KeyValueString = {power: 'activePower', current: 'rmsCurrent', voltage: 'rmsVoltage'};

// Wait 5 seconds before reporting a 0 value as this could be an invalid measurement.
Expand Down

0 comments on commit 6a03d6c

Please sign in to comment.