Updated to 2023.10.5 last night and one of my automations has stopped working.
It’s triggers by the elevation of the sun to turn on or off a switch called night_state. Which I then use to turn on and off lights etc. has there been an update to automations that would stop this from working? Maybe it no longer recognised minus numbers?
alias: "Night State Update "
description: ""
trigger:
- platform: numeric_state
entity_id: sensor.sun_solar_elevation
below: -1.5
id: below -1.5
- platform: numeric_state
entity_id: sensor.sun_solar_elevation
above: -1.5
id: above -1.5
condition: []
action:
- choose:
- conditions:
- condition: trigger
id:
- below -1.5
sequence:
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.night_state
- conditions:
- condition: trigger
id:
- above -1.5
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.night_state
mode: single
Tinkerer
(aka DubhAd on GitHub)
November 1, 2023, 7:44am
2
Check the trace (and log file) and see what’s happening
koying
(Chris B)
November 1, 2023, 10:57am
3
What is the definition of that sensor?
Why not using, e.g.
- platform: numeric_state
entity_id: sun.sun
attribute: elevation
below: -1.5
id: below -1.5
From the very limited changes of 2010.10.5, it seems unlikely the release is actually the root cause of your issue.
Trace is blank because it isn’t being fired and log shows nothing about the automation.
The automaton has worked for 2 years faultless untill I updated to 10.5 last night.
Managed to get a working automation with this
alias: "Night State Update "
description: ""
trigger:
- platform: state
entity_id:
- sun.sun
attribute: elevation
condition: []
action:
- if:
- condition: numeric_state
entity_id: sun.sun
attribute: elevation
below: -1.5
then:
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.night_state
else:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.night_state
mode: single
But still can’t see why the original stopped working.
pcwii
(Pcwii)
November 1, 2023, 2:19pm
6
What version were you running before updating?
I remember reading something about location and Elevation at some point. Is your location set?
2023.10.3 before updating. Yeah location is set and the entity was updating its elevation just for some reason the automation wasn’t picking up the change when it went below or above -1.5