Please share your ideas for this: I have a (very simple) Home Assistant setup in the house. The kitchen sink light is currently configured to come on at the earlier of 17:40 and sunset. (The portion of the yaml file is shown below).
This works great during the summer, but during the winter, when sunset can happen quite early, the light comes on too early. What I would like to do is configure the automation like this: Turn on the switch at the earlier of 19:40 or sunset_time where sunset_time is the later of sunset and 18:30. Would you please suggest how to do this, thanks.
The existing yaml file contents:
alias: Kitchen Sink Light On
trigger:
- platform: sun
event: sunset
offset: 0
- platform: time
at: '19:40:00'
condition: []
action:
- type: turn_on
device_id: b00a5fc57fcb525d5ff2ed9f00e1e59d
entity_id: switch.shelly_2
domain: switch
mode: single