-
-
Notifications
You must be signed in to change notification settings - Fork 215
Open
Description
Hey folks,
I was thinking about contribution an alarm clock feature to the device. Something that is running locally on the ESP, that can then be triggered from HA via voice commands. So the alarm would be independent from HA, once it's set, similar to the timer.
For the first iteration I propose to set only a single alarm:
- add a
timesource (e.g. platform homeassistant) - add a global
intvariable with the next alarm and a gobalboolvariable if the alarm is active - once a minute, check if the alarm has expired and then trigger the sound, similar to the timer.
- alarm can be configured through a
actions from HA, something like:set_alarm(set alarm to specific datetime)stop_alarm(when it's alarming right now)cancel_alarm(to cancel/disable an alarm that was set before)- expose current alarm as
sensor(or something to HA), read-only
- Persist alarm(s) (
restore_value: yes) during a power outage/restart/update/... (assuming we have enough space in the persistent storage?) to not lose the alarm in case of a restart of the device. - Once that works on the ESP, add the voice commands to the list of intents (https://github.com/OHF-Voice/intents) and integrate in Home Assistant Core.
In future iterations we could extend the functionality with:
- add a snooze functionality (reset the alarm to x minutes in the future)
- support multiple alarms (allow having more than one alarm, allow to cancel a specific one)
I'm happy to propose some implementation, but I wanted to hear you thoughts first.
Does that make sense?
Any better ideas?
Related discussions/requests:
saya6k, aeroniemi, Hedda, felixschndr, tobiloeb and 2 more
Metadata
Metadata
Assignees
Labels
No labels