thank you very much for your link. It seems there is an issue (maybe with formatting / indentation) with this example? I copied it and edited it the way I think is correct, but still get an error:
Invalid config for [automation]: [minutes] is an invalid option for [automation]. Check: automation->minutes. (See /config/configuration.yaml, line 18). Please check the docs at Automation - Home Assistant
I think I managed to get it to work by myself. platform: time should actually be platform: time_pattern.
For anyone who is also struggling, here is my code for the automation:
I am using a Samsung S9 and Ariela. The timestamp I get in HA from my alarm sensor is in format â2001-01-01T01:01+0100â.
I have tried to use the suggested format above, but canât get HA to read it.
Then it looks like you get a different format than %Y-%m-%d %H:%M:00, as you also have the timezone embedded. Is the states.sensor.galaxy_s9_alarm_sensor.state not of format 2019-12-14 07:55:00 ?
Can you try again with the latest version 1.8 and use the input_datetime instead? You can read how to configure the input_datetime here. If the problem persist, can you paste the log from the âEdit Connectionâ view?
Ahhh, sorry, didnât see that thread. Sorry for double your things. You have made an awesome project and I like it very much. I will definitely use this onwards. Thanks!
Using long lived token
Entity ID is of type input_datetime
Request: POST https://xxxxxxx.duckdns.org/api/services/input_datetime/set_datetime
Request headers: Authorization: Bearer long_lived_token_here_abcdefgh
Request body: {âdatetimeâ:â2020-02-04 06:12:01â,âentity_idâ:âinput_datetime.next_alarmâ}
Failure: 400:Bad Request
hi johboh
I removed from the configuration.yaml the legacy api password entry. I was keeping it there for historical reasons (silly), although i was not using it anymore.
I restarted HA and now connection is successful using: https://xxxxxxx.duckdns.org/ (no port)
Would it be possible to add a feature where it looks at the label on Android to determine the ânext alarmâ. For instance, if I have 2 alarms set throughout the day, but only 1 is to get upâŠI would want my morning automation to only run for the first alarm and not the second. Is this do-able?
I donât think so. The API only expose the next alarm timestamp, and nothing about the label/name of the alarm. The API Iâm using is a public Android OS API which reports the next scheduled alarm, as set by the alarm clocks apps, Iâm not interfacing with the alarm app itself (as they donât expose any API).
However I do understand the need for it. Maybe I can add some kind of silent/cutoff-period setting so one can specify to not report any next alarm to hass between these times. Or a setting to only report the first alarm in the day.