Hello,
try to turn on, the lighting when the sun goes down (+ the time it gets dark)
the lighting should be on for 3 hours.
after 3 hours the lighting should go off.
and the next day the same.
has made his own, has worked but not now. can anyone help me with that .
Thanks
It might be able to work, but I can imagine it wonāt because it is not a specific trigger. Itās more a condition.
It also matches below -18 for example. But as said, it might work because HA is pretty clever from time to time.
Anyway, Iād try using a template trigger with a fixed ātrueā match, for example:
No, it is a specific trigger. Trigger when elevation goes below -17.22. This will trigger whenever the elevation goes from above -17.22 to below -17.22. If you are already at e.g. -18 and it changes to -19, it wonāt trigger, it only triggers when it goes from above the value to below the value.
Thanks for the reply.
To be more understandable.
I want to trigger a switch when the sun goes down elevation trigger (for example the lighting should turn on, after 1 hour the sun goes down dusk. The lighting should be on 4 hours. Then the lighting should turn off.) It should be done every day, should follow, elevation sun for each day.
Hope you understand what I mean.
Thanks
All ingredients to achieve that goal are here.
If itās always at 1hr after sunset, iād use the earlier mentioned Sun trigger and set the offset.
If you want it to turn of the light 4hrs later, you could:
set a trigger at sunset with the offset 5:00
set a trigger at light on for 4 hours (less reliable in case you reboot or edit automations in the meantime)
set a time or datatime helper at the timestamp: now().seconds + 14400 and use that as a trigger.
Thanks again Recte,
for you itās easy, but for me itās hard to understand, Am a little old man 65 and itās actually complicated, could you help me with this, if you have the time.
Grateful for that.
This is my automation now.
- alias: 'Turn ON Hus lights on when the sun gets dim'
trigger:
platform: numeric_state
entity_id: sun.sun
value_template: "{{ state_attr('sun.sun', 'elevation') }}"
below: -4.00
action:
service: switch.turn_on
entity_id: switch.telldus_tzwp_102_plug_in_switch_switch_5
- alias: 'Turn Off Hus Light at dusk'
trigger:
platform: numeric_state
entity_id: sun.sun
value_template: "{{ state_attr('sun.sun', 'elevation') }}"
above: -8.00
action:
service: switch.turn_off
entity_id: switch.telldus_tzwp_102_plug_in_switch_switch_5
Thanks Recte,
after several attempts I found a similar description for another automation, and it went well with the GUI, but once again thanks for the answer.
//Christian