Hi!
I’m having trouble finding a way to turn on the light bar on my desk based on the state of the sun.sun entity and ping.
I want to achieve the lightbar turning on when the sun is “below_horizon”, regardless of whether I have a response to the ping command at the time of the sun.sun state change, or if the response comes later.
Simple code below not working.
alias: Włączenie lampki 30 minut po zachodzie laptop
description: ""
trigger:
- platform: state
entity_id:
- sun.sun
to: below_horizon
for:
hours: 0
minutes: 0
seconds: 0
condition:
- condition: state
entity_id: binary_sensor.laptop
state: "on"
for:
hours: 0
minutes: 0
seconds: 0
action:
- type: turn_on
device_id: b0e69cc5b6e25cf35d236959508e563b
entity_id: aeffb3705b72c2f987d29a7f074f0b6a
domain: light
mode: single