Ratgdo state

I just installed the ESPHome version of Ratgdo on one of my garage doors. Everything works well with it as far as door/light control and everything showing in HA. I do have a question and I do not know if it is a Home Assistant fix or something needs added into the ESPHome code on the module. I need a way to retain the last changed time of the door state within HA.
I am using the Mushroom Cover card and it displays the a time of the last state change for the door. This value resets to zero anytime the module reboots or when HA reboots. How can I retain that value to be displayed on the card?

If it’s not already stored in a sensor, create a text sensor on the ESPHome device that refers to a global variable that stores the open time, with restore_value: and restore_from_flash: set.

There could be other, better ways… :slight_smile: