Hi,
I have the Home Assistant running on my Raspberry 3.
I also have an AVR Net IO board installed where my garden light is connected to. So I can switch on my garden ligth manually over Home Assistant perfectly. Now I tried an autoamtion to switch on the lights automatically when the sun sets (including time offset and timer). The automation itself is working fine but sometimes the light is switched on and on some days teh light is not on (however the automation works…). I don’t know why…no idea?
Can anyone give me an advice?
switch:
- platform: command_line
scan_interval: 5
switches:
gartenlicht:
friendly_name: Gartenlicht
command_on: 'echo setport 6.1 | nc 192.168.xxx.xx 50290 && echo setport 6.0 | nc 192.168.xxx.xx 50290'
command_off: 'echo setport 6.1 | nc 192.168.xxx.xx 50290 && echo setport 6.0 | nc 192.168.xxx.xx 50290'
automation:
- alias: Gartenlicht an vor Sonnenuntergang
initial_state: True
hide_entity: False
trigger:
platform: sun
event: sunset
offset: "-00:15:00"
action:
service: homeassistant.turn_on
entity_id: script.timed_gartenlichtabend
script:
timed_gartenlichtabend:
alias: Gartenlicht an mit Timer abends
sequence:
- service: switch.turn_on
data:
entity_id: switch.gartenlicht
- service: script.turn_on
data:
entity_id: script.timerabend_off
timerabend_off:
alias: Timer Gartenlicht am Abend aus nach Zeit 5 h 30 min
sequence:
- delay:
hours: 5
minutes: 30
seconds: 00
- service: switch.turn_off
data:
entity_id: switch.gartenlicht