Closed fluffysfriends closed 3 years ago
When you say 'active', do you mean, if the alarm is currently going off?
There is no way to check that. This information is not exposed by the google home api.
My personal solution to this problem is to check if the state transitions to a new value and if the previous state was close enough to 'now'. That way deleted alarms will not trigger any automations.
I have the lenovo smart clock as my google home device. and on this device i can set multiple alarms. And i can set them to active or in active eg. If the alarm will go off at a specife time or not. Example if I set the alarm to go of 08:30 on a monday and only monday. The next alarm i will set is for 09:30 on fridays. I want to keep them set but that the addon will only see them on there specfi time and date
Well that is how the underlying api works.
The documentation even mentions, that you can only query 'active' timers: https://rithvikvibhu.github.io/GHLocalApi/#operation/GetAlarmsandTimers
So you can leave your other alarms set, but the integration will always show only the next active alarm, that will actually ring.
If i understand this correct I looking for the status alternativ and check if the alarm is ringing
If i understand this correct I looking for the status alternativ and check if the alarm is ringing
Oh interesting! Total overlooked that status part. Looks reasonable, I will try to implement that soon. But this will require a breaking release.
Status is exposed as of v0.4.0
I have a ide for a new feture. To my knowledge the addon track only if there is a set alarm not if the alarm is active or not. My ide is that the addon will make this check