Skip to content
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

Add and improve heartbeat-message processing for Xiaomi RTCGQ12LM, RTCGQ13LM and RTCGQ15LM #4522

Merged
merged 1 commit into from
Aug 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/xiaomi.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
payload[`state_${mapping}`] = value === 1 ? 'ON' : 'OFF';
} else if (['WXKG14LM', 'WXKG16LM', 'WXKG17LM'].includes(model.model)) {
payload.click_mode = {1: 'fast', 2: 'multi'}[value];
} else if (['WXCJKG11LM', 'WXCJKG12LM', 'WXCJKG13LM', 'ZNMS12LM', 'RTCGQ14LM', 'ZNCLBL01LM'].includes(model.model)) {
} else if (['WXCJKG11LM', 'WXCJKG12LM', 'WXCJKG13LM', 'ZNMS12LM', 'ZNCLBL01LM', 'RTCGQ12LM', 'RTCGQ13LM', 'RTCGQ14LM',
'RTCGQ15LM'].includes(model.model)) {
// We don't know what the value means for these devices.
// https://github.com/Koenkk/zigbee2mqtt/issues/11126
// https://github.com/Koenkk/zigbee2mqtt/issues/12279
Expand Down Expand Up @@ -268,7 +269,7 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
mapping = 'right';
}
payload[`state_${mapping}`] = value === 1 ? 'ON' : 'OFF';
} else if (['RTCGQ12LM', 'RTCGQ14LM'].includes(model.model)) {
} else if (['RTCGQ12LM', 'RTCGQ14LM', 'RTCGQ15LM'].includes(model.model)) {
// Sometimes RTCGQ14LM reports high illuminance values in the dark
// https://github.com/Koenkk/zigbee2mqtt/issues/12596
const illuminance = value > 65000 ? 0 : value;
Expand Down