Wrong value of last_updated and last_changed of xiaomi binary sensor

Hello, I have an issue with the value of the property last_updated and last_changed when I restart the instance. I have the Xiaomi Door Window sensor connected to the instance and the trigger for open or close works well. But, when I restart the instance, the value of last_updated and last_changed are updated with the date of restart. Is there a bug of Xiaomi binary sensor or Hass.io. Currently, I have the last version of Hass.io instance!


Hass.io is how you installed the software - Home Assistant.

However, please read this sticky post. We don’t know what actual version of Home Assistant you’re using (latest is not a number), how you’re connecting that sensor to Home Assistant, or anything else useful.

I’m using the version 0.98 of Home Assistant installed on RaspberryPi 3 B+. I have connected the Xiaomi Door Window sensor through the Xiaomi Gateway configured to work with WiFi. In Home Assistant I have a card that show the value of last_changed sensor. When the sensor trigger an event of open or close, the card show the last_changed value triggered by the sensor. When I restart the instance of Home Assistant, the value showed by the card is the time of restart instance. For example, if I open/close the door, the card show the date 2019-09-06T18:21:15.524540+02:00. After restart Home Assistant, the date showed on the card has changed with the time of restart.


The last change is changed to the time of restarting HA because it doesn’t know what happened while it was down, so it shows the last time it can verify a state change for - startup.

Not a bug in anything, simply a design choice.

Ok, thanks for your response!