HA2NV
October 4, 2023, 8:27am
1
Hello there,
I’m very new to the world of home automation and have recently set up some very simple automations for some roller shutters.
The shutter will open 50% at sunrise, and then close completely at a specific time, say 10am.
I’m am running ZigBeemqtt.
I set up a shutter to do so, and it worked correctly one day. The next, it didn’t work and it looked like the automation didn’t run either (although this could be me not interpreting it correctly). My question is, do time based automations run forever, or do they happen once and then HA considers them completed?
If so, how do I set up a loop for infinity?
Thank you in advance
tom_l
October 4, 2023, 8:40am
2
Forever is a very long time but yes. Your automation should continue to trigger every day.
To see why the automation did not do what you expected have a look at the automation traces. See:
If you post your automation here on the forum (and correctly format it ) we might be able to spot what is wrong.
jchh
((not John))
October 4, 2023, 8:42am
3
Can you share your automation?
HA2NV
October 4, 2023, 10:06am
4
Hi guys,
This is what I have for raising the shutter based on sunrise:
alias: Shutter Up
description: ""
trigger:
- platform: sun
event: sunrise
offset: "00:10:00"
condition: []
action:
- device_id: 58a1d726e9a770dbad7e982f606880e9
domain: cover
entity_id: ecf8b44d85b3ee4d83070625a0be15fd
type: set_position
position: 50
mode: single
For lowering the shutter, I have:
alias: Shutter Close
description: ""
trigger:
- platform: time
at: "10:00:00"
condition: []
action:
- device_id: 58a1d726e9a770dbad7e982f606880e9
domain: cover
entity_id: ecf8b44d85b3ee4d83070625a0be15fd
type: close
mode: single
It’s very simple, so I am trying to learn the basics before I add conditions etc.
Thank you
jchh
((not John))
October 4, 2023, 10:17am
5
Not knowing where in the world you are, there could be a problem if 10-mins-after-Sunrise occurs after 10am.
HA2NV
October 4, 2023, 10:21am
6
Hi jchh,
No that’s not a problem in my side of the world.
Does anything stand out as incorrect?
Cheers
HA2NV
October 4, 2023, 10:23am
7
On second thoughts, am I right in saying that sunrise is calculated based on where I have set my home location?
jchh
((not John))
October 4, 2023, 10:24am
8
nothing obvious, no. If it worked once, it should continue working.
I don’t have shutters and I try to avoid using the device_id (I prefer only entity_id), but that’s just me
jchh
((not John))
October 4, 2023, 10:25am
9
yes, it is. I imagine if you are closer to the (ant)artic circle this would become an issue.
edit: where is your home location? …you can check your sunrise by going to developer tools ➜ states and type in sun.sun (assuming it is the sun
integration you are using).
HA2NV
October 4, 2023, 10:47am
10
I’m in NSW Australia.
I presume the time is in UTC?
jchh
((not John))
October 4, 2023, 11:26am
11
G’day
yes, you should be able to see your local offset. Mine is:
2023-10-04T12:24:39.293985+01:00
and the +01:00
is my offset to UTC (currently in British Summer time).
…lived in Australia for 6 years - say Hi to it
Edit: btw, I use the sun2 HACS as it has nicer sensors to sun.sun
eg: sensor.dawn
, sensor.dusk
etc.
HA2NV
October 4, 2023, 11:55am
12
Australia says hello back!
I don’t see anything wrong with my sunrise values.
I guess I’ll monitor it over the next few days and report back.
jchh
((not John))
October 4, 2023, 12:16pm
13
It may be worth checking what your logs say around the time that the automations should run - might show something.