Skip to content

Commit

Permalink
fix: Fix brightness out of range for various TuYa devices Koenkk/zigb…
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Apr 13, 2024
1 parent 3fc4c50 commit afc386e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/tuya.ts
Expand Up @@ -1196,7 +1196,7 @@ const tuyaFz = {
convert: (model, msg, publish, options, meta) => {
if (msg.data.hasOwnProperty('61440')) {
const property = utils.postfixWithEndpointName('brightness', msg, model, meta);
return {[property]: msg.data['61440']};
return {[property]: utils.mapNumberRange(msg.data['61440'], 0, 100, 0, 255)};
}
},
} satisfies Fz.Converter,
Expand Down

0 comments on commit afc386e

Please sign in to comment.