Skip to content

Commit

Permalink
Refs Koenkk/zigbee2mqtt#12952: Lonsonho TS110E_2gang - replace `moe…
Browse files Browse the repository at this point in the history
…s_power_on_behavior` coverter with `tuya_switch_power_outage_memory` since we don't want to expose the `READ` capability (returns incorrect value)
  • Loading branch information
gorbunovav committed Jun 29, 2022
1 parent 2a4b36e commit a464bb9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions devices/lonsonho.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,21 +222,21 @@ module.exports = [
vendor: 'Lonsonho',
description: 'Zigbee smart dimmer module 2 gang with neutral',
fromZigbee: extend.light_onoff_brightness({ disablePowerOnBehavior: true }).fromZigbee.concat([
fz.moes_power_on_behavior,
fz.tuya_switch_power_outage_memory,
fz.TS110E_switch_type,
]),
toZigbee: extend.light_onoff_brightness({ disablePowerOnBehavior: true }).toZigbee.concat([
tz.moes_power_on_behavior,
tz.tuya_switch_power_outage_memory,
tz.TS110E_switch_type,
]),
meta: {multiEndpoint: true},
exposes: [
e.light_brightness().withEndpoint('l1'),
e.light_brightness().withEndpoint('l2'),
exposes.enum(
'power_on_behavior',
'power_outage_memory',
ea.STATE_SET,
['off', 'previous', 'on']
['on', 'off', 'restore']
).withDescription('Recover state after power outage')
.withEndpoint('l1'),
exposes.presets.switch_type_2().withEndpoint('l1'),
Expand All @@ -246,6 +246,7 @@ module.exports = [
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
await device.getEndpoint(1).read('genOnOff', ['moesStartUpOnOff']);
},
endpoint: (device) => {
return {l1: 1, l2: 2};
Expand Down

0 comments on commit a464bb9

Please sign in to comment.