Yoda-x / ha-zha-new

update of the zha component
56 stars 10 forks source link

Aqara Sensor - State Values Initially Show as '-' #41

Closed mrfoxbit closed 6 years ago

mrfoxbit commented 6 years ago

Hi. I have some problems with my Aqara Device (temperature sensor, door sensor, motion sensor). I'm still configuring my HA and having to reboot several times. After pairing they work fine, but after restarting the HA or restarting the pi, the temperature, humidity and pressure ... the value will not be sent to the HA until ~ 10 minutes or more than. They are still unknown until the sensor data is sent.

Hope you can help and fix it.

Yoda-x commented 6 years ago

This is normal behavior. As these are sensors that push only updates, and not to be polled, there is not code to read previous data on startup. Even there may be the an cached old value in the zigbee database, the code just listen on events trigged by the sensor. you can try to create a script which reads from the hstory log the last value and overwrite the HASS state. But this out of the scope of the zha code.