Skip to content

Commit

Permalink
fix: Fix invalid contact for MCCGQ01LM (#7452)
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Apr 27, 2024
1 parent 48b8b75 commit d9640a4
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/lib/lumi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -800,10 +800,6 @@ export const numericAttributes2Payload = async (msg: Fz.Message, meta: Fz.Meta,
// This is a a complete structure with attributes, like element 0 for state, element 1 for voltage...
// At this moment we only extract what we are sure, for example, position 0 seems to be always 1 for a
// occupancy sensor, so we ignore it at this moment
if (['MCCGQ01LM'].includes(model.model)) {
// @ts-expect-error
payload.contact = value[0].elmVal === 0;
}
// @ts-expect-error
payload.voltage = value[1].elmVal;
if (model.meta && model.meta.battery && model.meta.battery.voltageToPercentage) {
Expand Down

0 comments on commit d9640a4

Please sign in to comment.