Hi all i’d like my light turn on when i enter home and is after a specific time on a specific season, i can’t reach it i think because of condition error. This is my code:
- id: '1562678873887'
alias: Accensione luce corridoio
trigger:
platform: state
entity_id: binary_sensor.door_window_sensor_xxxxx
from: 'off'
to: 'on'
condition:
condition: or
conditions:
- condition: state
entity_id: sensor.season
state: 'Summer'
- condition: time
after: '20:00:00'
- condition: and
conditions:
- condition: state
entity_id: sensor.season
state: 'Winter'
- condition: time
after: '17:00:00'
action:
- alias: 'Accensione luce corridoio'
service: scene.turn_on
entity_id : scene.xxxx
Thanks I’ll check…
Another thing.
This automation will turn on the light also if i’m exiting from home, how can i do that only entering?
May i use some device traking?
Thanks
We have exactly this type of setup, but I’m using NodeRED to create the flow, since it’s a hell of a lot easier to understand than nested conditions. Our trigger currently is Life360 with presence detection.
For your particular need, you would be better off figuring out what the sun angle needs to be in order for that light to turn on, and then you’ll have 365 days of accuracy instead of 2 seasons. Plus, you’ll be able to accommodate shade trees or mountains that block the sun earlier than a static time.
When I come home, if the sun is below X angle, turn whatever on.