Skip to content

Commit

Permalink
fix: Correct attribute name for Aqara curtain hand open (#7476)
Browse files Browse the repository at this point in the history
Fixed the wrong attribute name for Aqara curtain hand open
  • Loading branch information
aurimasniekis committed May 1, 2024
1 parent 6152028 commit 1f91c88
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/lumi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2643,8 +2643,8 @@ export const fromZigbee = {
cluster: 'manuSpecificLumi',
type: ['attributeReport', 'readResponse'],
convert: (model, msg, publish, options, meta) => {
if (msg.data.hasOwnProperty('curtainManual')) {
return {hand_open: msg.data['curtainManual'] === 0};
if (msg.data.hasOwnProperty('curtainHandOpen')) {
return {hand_open: msg.data['curtainHandOpen'] === 0};
} else if (msg.data.hasOwnProperty('curtainReverse')) {
return {reverse_direction: msg.data['curtainReverse'] === 1};
} else if (msg.data.hasOwnProperty('curtainCalibrated')) {
Expand Down Expand Up @@ -4194,10 +4194,10 @@ export const toZigbee = {
lumi_curtain_hand_open: {
key: ['hand_open'],
convertSet: async (entity, key, value, meta) => {
await entity.write('manuSpecificLumi', {'curtainManual': !value}, manufacturerOptions.lumi);
await entity.write('manuSpecificLumi', {'curtainHandOpen': !value}, manufacturerOptions.lumi);
},
convertGet: async (entity, key, meta) => {
await entity.read('manuSpecificLumi', ['curtainManual'], manufacturerOptions.lumi);
await entity.read('manuSpecificLumi', ['curtainHandOpen'], manufacturerOptions.lumi);
},
} satisfies Tz.Converter,
lumi_curtain_reverse: {
Expand Down

0 comments on commit 1f91c88

Please sign in to comment.