-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Try to fix unrealistic pressure readings from WSDCGQ12LM. #7259
Try to fix unrealistic pressure readings from WSDCGQ12LM. #7259
Conversation
src/lib/lumi.ts
Outdated
type: ['attributeReport', 'readResponse'], | ||
convert: (model, msg, publish, options, meta) => { | ||
let pressure = 0; | ||
if (msg.data.hasOwnProperty('scaledValue')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this part can to into the official fz.pressure
Then call it from here, example:
const result = await fz.humidity.convert(model, msg, publish, options, meta); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, true enough.
Oops. The last commit has a bug in it ... |
Thanks! |
Wait! The tab char was not the problem, the comparison is broken! |
Whoops, reverted it, could you make a new pr? |
Yes, of course. |
Similar to issue Koenkk/zigbee2mqtt#798 my instance of the WSDCGQ12LM sporadically returns unrealistic high pressure readings > 30000 hPa. This PR tries to fix this in the same manner as issue Koenkk/zigbee2mqtt#798 was fixed in commit 9bdebcd.