I have an alarm script that I’ve created many years ago and it works flawlessly on a web based server. I want to bring parts of it into Home Assistant to be able to create extra routines.
What I’ve done so far is I’ve gotten Node-Red to take the JSON that the web page creates and put it into MQTT. The JSON has the alarms in the form of normal UNIX timestamp and out of MQTT I’ve gotten it to grab a sensor and create it as a text field in the form of a sensor.
- platform: mqtt
name: “Google_Wake_Up_Alarm”
state_topic: "calendaralarm/quickstart"
value_template: '{{ value_json.alarm.unixWakeUpTime | int | timestamp_custom("%d.%m.%Y %H:%M")}}'
icon: mdi:alarm
I want to be able to take those sensors and create timed automation with them. The Unix time changes whenever a new calendar event is created so the UNIX timestamp is able to change (this part works as expected with no issues). Each alarm (there are 3 per day) has a specific date they are supposed to happen on. So I can’t create it on just the same day each like a normal day, they are day specific and never consistently on the same day or time of day.
The way I get this output is (“Google_Wake_Up_Alarm” 16.10.2021 04:49) from 1634325840.
How do I turn this into something usable by HA and Automations?