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

Removal of config/temperature for various Xiaomi devices #7827

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
10 changes: 0 additions & 10 deletions devices/xiaomi/lumi_motion_ac01.json
Original file line number Diff line number Diff line change
Expand Up @@ -221,16 +221,6 @@
"name": "config/sensitivitymax",
"static": 2
},
{
"name": "config/temperature",
"awake": true,
"parse": {
"fn": "xiaomi:special",
"at": "0x00F7",
"idx": "0x03",
"eval": "Item.val = Attr.val * 100"
}
},
{
"name": "config/triggerdistance",
"parse": {
Expand Down
11 changes: 0 additions & 11 deletions devices/xiaomi/lumi_sensor_wleak_aq1.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,6 @@
{
"name": "config/reachable"
},
{
"name": "config/temperature",
"awake": true,
"parse": {
"fn": "xiaomi:special",
"mf": "0x115F",
"at": "0xFF01",
"idx": "0x03",
"eval": "Item.val = Attr.val * 100"
}
},
{
"name": "state/lastupdated"
},
Expand Down
11 changes: 0 additions & 11 deletions devices/xiaomi/lumi_vibration_aq1.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,17 +134,6 @@
"name": "config/sensitivitymax",
"static": 2
},
{
"name": "config/temperature",
"awake": true,
"parse": {
"fn": "xiaomi:special",
"mf": "0x115F",
"at": "0xFF01",
"idx": "0x03",
"eval": "Item.val = Attr.val * 100"
}
},
{
"name": "state/lastupdated"
},
Expand Down
10 changes: 0 additions & 10 deletions devices/xiaomi/xiaomi_mccgq11lm_openclose_sensor.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,6 @@
{
"name": "config/reachable"
},
{
"name": "config/temperature",
"awake": true,
"parse": {
"fn": "xiaomi:special",
"at": "0xFF01",
"idx": "0x03",
"eval": "Item.val = Attr.val * 100"
}
},
{
"name": "state/lastupdated"
},
Expand Down
51 changes: 33 additions & 18 deletions devices/xiaomi/xiaomi_rtcgqq11lm_presence_sensor.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"uuid": "85676803-9d00-47fe-838f-ce76dfafc276",
"manufacturername": "$MF_LUMI",
"modelid": "lumi.sensor_motion.aq2",
"vendor": "Xiaomi",
"product": "Aqara motion sensor RTCGQ11LM",
"vendor": "Xiaomi Aqara",
"product": "Motion sensor (RTCGQ11LM)",
"sleeper": true,
"status": "Gold",
"subdevices": [
Expand Down Expand Up @@ -46,6 +46,19 @@
},
{
"name": "attr/swversion",
"parse": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this already reported through the Xiaomi special attribute?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the tip, I'll try it again.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to work.

"fn": "zcl:attr",
"ep": "0x01",
"cl": "0x0000",
"at": "0x0001",
"eval": "Item.val = '0.0.0_' + ('0000' + Attr.val.toString()).slice(-4)"
},
"read": {
"fn": "zcl:attr",
"ep": "0x01",
"cl": "0x0000",
"at": "0x0001"
},
"refresh.interval": 86400
},
{
Expand All @@ -58,9 +71,9 @@
"name": "config/battery",
"awake": true,
"parse": {
"at": "0xff01",
"ep": 1,
"fn": "xiaomi:special",
"mf": "0x115F",
"at": "0xFF01",
"idx": "0x01",
"script": "xiaomi_battery.js"
}
Expand All @@ -75,17 +88,6 @@
{
"name": "config/reachable"
},
{
"name": "config/temperature",
"awake": true,
"parse": {
"at": "0xff01",
"ep": 1,
"eval": "Item.val = Attr.val * 100",
"fn": "xiaomi:special",
"idx": "0x03"
}
},
{
"name": "state/lastupdated"
},
Expand Down Expand Up @@ -138,6 +140,19 @@
},
{
"name": "attr/swversion",
"parse": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this already reported through the Xiaomi special attribute?

"fn": "zcl:attr",
"ep": "0x01",
"cl": "0x0000",
"at": "0x0001",
"eval": "Item.val = '0.0.0_' + ('0000' + Attr.val.toString()).slice(-4)"
},
"read": {
"fn": "zcl:attr",
"ep": "0x01",
"cl": "0x0000",
"at": "0x0001"
},
"refresh.interval": 86400
},
{
Expand All @@ -150,9 +165,9 @@
"name": "config/battery",
"awake": true,
"parse": {
"at": "0xff01",
"ep": 1,
"fn": "xiaomi:special",
"mf": "0x115F",
"at": "0xFF01",
"idx": "0x01",
"script": "xiaomi_battery.js"
}
Expand Down Expand Up @@ -193,4 +208,4 @@
]
}
]
}
}
11 changes: 0 additions & 11 deletions devices/xiaomi/xiaomi_wxkg11lm_mini_switch.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,6 @@
{
"name": "config/reachable"
},
{
"name": "config/temperature",
"awake": true,
"parse": {
"at": "0xFF01",
"ep": 1,
"fn": "xiaomi:special",
"idx": "0x03",
"eval": "Item.val = Attr.val * 100"
}
},
{
"name": "state/buttonevent"
},
Expand Down