Restore entity state after ha restart

My goal is to write an app the restore entity states after home assistant restart.

I think listening for events homeassistant_start and homeassistant_stop is a way to start developing, but I can’t figure out what I’m doing wrong here. Events are not triggered. Please help!

self.listen_event(self.restore, “homeassistant_start”)
self.listen_event(, “homeassistant_stop”)

You might look at in the example apps, which does this already.


Thanks! Great example.