cadavre / miio_gateway

lumi.gateway.mieu01 with custom miio_client integration for HA
54 stars 22 forks source link

Get battery status? + suggestion #19

Open alexisml opened 4 years ago

alexisml commented 4 years ago

1) First of all a question: is there any way to get the battery status of a device?

2) Suggestion: I had a hard time figuring out how to set up a termometer/hygrometer/thing. I would suggest adding an example, specifying that you need to set up the 3 sensors individually (repeat the same sid with 3 different classes).

aburghelea commented 3 years ago

Hey there.

For the first part it greatly depends on the data that the gateway is reporting. If there is the battery status over there , in theory you could. I have some both Xiaomi and Aquaria to play with in the next couple of weeks and will get back to you, if I see something.

For the second part, after you join the device via the join_zigbee service and get the SID you just add something like.

sensors:
  - sid: lumi.158d0003d2d1dd
    friendly_name: Bedroom Temperature
    class: temperature
    restore: true
  - sid: lumi.158d0003d2d1dd
    friendly_name: Bedroom Humidity
    class: humidity
    restore: true