Skip to content

Commit

Permalink
Fix duplication temperature/device_temperature SSM-U01
Browse files Browse the repository at this point in the history
  • Loading branch information
McGiverGim committed May 20, 2022
1 parent 88fa4b7 commit c775642
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion devices/xiaomi.js
Original file line number Diff line number Diff line change
Expand Up @@ -1568,7 +1568,7 @@ module.exports = [
fromZigbee: [fz.on_off, fz.device_temperature, fz.aqara_opple, fz.ignore_metering, fz.ignore_electrical_measurement,
fz.xiaomi_power],
exposes: [e.switch(), e.energy(), e.power(), e.device_temperature(), e.power_outage_memory(), e.power_outage_count(),
e.switch_type(), e.voltage(), e.temperature(), e.current(),
e.switch_type(), e.voltage(), e.current(),
],
toZigbee: [tz.xiaomi_switch_type, tz.on_off, tz.xiaomi_switch_power_outage_memory, tz.xiaomi_led_disabled_night],
configure: async (device, coordinatorEndpoint, logger) => {
Expand Down
2 changes: 2 additions & 0 deletions lib/xiaomi.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
case '3':
if (['WSDCGQ12LM'].includes(model.model)) {
// This temperature value is ignored because with greater accuracy it is reported in key №100
} else if (['SSM-U01'].includes(model.model)) {
payload.device_temperature = value;
} else if (!['WXCJKG11LM', 'WXCJKG12LM', 'WXCJKG13LM'].includes(model.model)) {
payload.temperature = calibrateAndPrecisionRoundOptions(value, options, 'temperature'); // 0x03
}
Expand Down

0 comments on commit c775642

Please sign in to comment.