Hello. I want an automation that activates my blinds at sunset (if it’s before 21:30) or at 21:30. I have this:
alias: Persianas P1 Bajar (21:30 o puesta de sol)
description: ""
trigger:
- platform: sun
event: sunset
condition:
- condition: or
conditions:
- condition: time
after: "21:30:00"
- condition: template
value_template: >-
{{ (as_timestamp(state_attr('sun.sun', 'next_setting')) | int) <=
as_timestamp('2023-10-14 21:30:00') }}
action:
- service: script.persianas_p1_bajar
data: {}
mode: single
But it doesn’t work fine. Any help?