Johboh/hassalarm

Sync the alarm's enabledness

Closed this issue · 4 comments

What's the expected behaviour if I disable all alarms on my phone? If I go into Hassalarm, it says "No next alarm scheduled", but it doesn't perform any successful requests to Home Assistant while in this state. So in Home Assistant, the alarm time stays as it was, as though I hadn't disabled it.

I'm not sure what the sensible thing to do here really is. Perhaps set the alarm time to an arbitrary date in the past or far future? Seems a bit inelegant, but would be an improvement on the current behaviour.

The expected behavior is that it should sync an "empty" time, but it might have stopped functioning since the input_datetime change. I will look into it!

@dphoyes I pushed a new version with a fix for this now. The input_dateime is set to the default initial value 1970-01-01 00:00:00 which Home Assistant set when the value of an input_datetime is unknown.

Closing this. Please repoen if this is still an issue.

Forgot to say thanks! It's working perfectly now.