I’m running 7.1 on Raspberry 3A+. Fairly fresh installation with only a few entities so far.
My plan was to raise the window shutters when my phone alarm goes off. The shutters are controlled via a separate bridge, but it worked ok doing it manually (i.e. pressing a button in HA). I tried to include my phone alarm as well, but that is causing issues where the shutters would just randomly raise in the middle of the night.
For setting the alarm, I’m using the Android app and I’ve enabled the “next_alarm” sensor. When I was testing it out, I would set the alarm a few minutes in advance and it would always trigger ok, so that rules out any timezone differences. I then tied the alarm trigger to raising the shutters and tested it a few times by setting the alarm a few minutes ahead and it worked great. I then set the alarm for the next morning and went to bed.
The alarm was set for 7:00 (am), but the shutters went up at around 1:30 (am). I lowered them manually and went back to sleep. Then at around 6:45, the shutters went up yet again.
The trigger itself is fairly basic:
{{ states('sensor.date_time') == as_timestamp(states.sensor.mi_9t_next_alarm.state)| timestamp_custom('%Y-%m-%d, %H:%M') }}
Since setting the alarm a few minutes in advance is working fine, I’m guessing there’s something else going on. Maybe HA/bridge loses connection and it somehow raises the shutters when it’s back? Or maybe the next_alarm gets momentarily set to a wrong value and it triggers the blueprint.
I’ve tried checking the log, but all I see is the time when the shutters were raised during the night. I can’t find what caused the trigger to go off.
Any help is much appreciated, thank you!
Edit: Here’s the complete automation as well if it helps:
alias: Mi9 Alarm Raises Shutters
description: ''
trigger:
- platform: template
value_template: >-
{{ states('sensor.date_time') ==
as_timestamp(states.sensor.mi_9t_next_alarm.state)|
timestamp_custom('%Y-%m-%d, %H:%M') }}
action:
- service: cover.open_cover
target:
entity_id: cover.rolo_spalnica
mode: single