I decided that since I have some WLED controlled LEDs setup along the front of the house I thought why not have the lights turn on when someone in the house returns home when it’s dark (after sunset) and the strips are not currently on.
So my first stumble was figuring out that the Home/Away values for the State were case sensitive. Now I have the strip turning on when the right conditions are met.
So on a real world test the automation did not turn on the LEDs when I returned home at lunch.
I was testing the Automation in HA by manually setting the state of my device tracker to ‘Away’ and then to ‘Home’. This state change triggered the Automation and the LEDs turned on.
But when I returned hom at lunch the Automation was not triggered.
I checked the history of my device and it changed from ‘Away’ to ‘Home’ at 12:42:25 but the last Automation trigger was at 11:26:59am (When I was testing).
This is what I am triggering on:
platform: state
entity_id: device_tracker.robs_mobile
to: Home
from: Away
The conditions are:
condition: sun
after: sunrise
and
condition: state
entity_id: light.holiday_wled
state: 'off'
With Action of:
service: light.turn_on
target:
device_id: f8170eb7cc72b6712b87dec319a3cadf
data:
color_name: white
effect: Solid
Thanks