Johboh/hassalarm

Entity not available after HA restart

Closed this issue · 12 comments

After restarting HA it loses the sensor identity of hassalarm until I either turn my alarm on/off, change the time or start the hassalarm app and tap 'save and test'.

As I'm often tinkering with the system after my gf's gone to bed and has set her alarm, this presents a problem.

Is there any way to tackle this?

Hi!
This is outside of control for the Hassalarm app, and I think this is more a question for the Home Assistant community on how states are kept on restart. I'm guessing https://www.home-assistant.io/integrations/history/ together with https://www.home-assistant.io/integrations/recorder/ might solve this, but I'm not sure.

I will add support for input_datetime. With that the value will persist.

Thank you! Any time frame / anything I can do to help?

I'm done with the implementation, I just need to do some more testing. There will be a release this weekend.

Awesome! I'll keep my eye on the play store then.

@MrAlfabet Version 1.5 is now pushed to Play Store.

I can't see it yet, but I'll keep an eye on it!

Do I have to do something special after updating? HA is still not remembering the instance after reboot.

@MrAlfabet
Can you confirm that:

  1. You followed the guide here on how to add an input_datetime input: https://github.com/Johboh/hassalarm/blob/master/README.md
  2. That you are using the input_datetime mode in the hassalarm app by setting the entity ID to the input you created in step 1, that is, input_datetime.next_alarm and that the entity ID is legacy sensor.. toggle is set to OFF.
  3. That you have working History and Recorder components enabled in Home assistant.

I have not installed History or Recorder, I think I misread your comment

I will add support for input_datetime. With that the value will persist.

As being that it's working now, even without history and recorder

I had to change the settings in the app as well, to date_time. instead of sensor. Got it working now, thanks!

@MrAlfabet great! Sorry for any confusion.