Skip to content

Commit

Permalink
fix: Fix brightness reporting for TuYa TS110E_2gang_2 Koenkk/zigbee…
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed May 21, 2024
1 parent 34d65a2 commit 05bd548
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/devices/tuya.ts
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,8 @@ const fzLocal = {
result['max_brightness'] = utils.mapNumberRange(msg.data['64516'], 0, 1000, 1, 255);
}
if (msg.data.hasOwnProperty('61440')) {
result['brightness'] = utils.mapNumberRange(msg.data['61440'], 0, 1000, 0, 255);
const propertyName = utils.postfixWithEndpointName('brightness', msg, model, meta);
result[propertyName] = utils.mapNumberRange(msg.data['61440'], 0, 1000, 0, 255);
}
return result;
},
Expand Down Expand Up @@ -6305,7 +6306,7 @@ const definitions: Definition[] = [
vendor: 'TuYa',
description: '1 channel dimmer',
extend: [light({powerOnBehavior: false, configureReporting: true})],
fromZigbee: [tuya.fz.power_on_behavior_1, fzLocal.TS110E_switch_type, fzLocal.TS110E],
fromZigbee: [tuya.fz.power_on_behavior_1, fzLocal.TS110E_switch_type, fzLocal.TS110E, fz.on_off],
toZigbee: [tzLocal.TS110E_light_onoff_brightness, tuya.tz.power_on_behavior_1, tzLocal.TS110E_options],
exposes: [e.power_on_behavior(), tuya.exposes.switchType(), e.min_brightness(), e.max_brightness()],
configure: tuya.configureMagicPacket,
Expand Down

0 comments on commit 05bd548

Please sign in to comment.