I have an Automation that Turns On the Living Room Light Switch if the Suns Solar Elevation has Dropped below 30 Degrees.
alias: Turn On Living Room Light when Sun is Below specific Solar Elevation
description: ''
triggers:
- trigger: sun.elevation_crossed_threshold
options:
for: '00:00:00'
threshold:
type: below
value:
active_choice: number
number: 30
conditions:
- condition: light.is_off
target:
entity_id: light.tv_led_lights_2
options:
behavior: any
for: '00:00:00'
- condition: switch.is_off
target:
device_id: 3ce021fd40174ddc11e1e00ab835928c
options:
behavior: any
actions:
- action: switch.turn_on
metadata: {}
target:
device_id: 3ce021fd40174ddc11e1e00ab835928c
data: {}
mode: single
This Automation has worked perfectly for some Time, however, over the Last Month it no longer seems to Run Automatically.
If I Run the Automation Manually, after confirming that the Suns Solar Elevation has Dropped Below the required point, it Runs perfectly, Turning On the Living Room Light Switch.
This Issue seems to have occurred after a Home Assistant Update, unfortunately, I do not know which one.
If the automation isn’t even running, there’s likely an issue with your home location and elevation set in general settings. Or you live in an area where the sun doesn’t set.
elevation should be set to 0 unless you live in a skyrise, the property says “above sea level”, however that’s not the real meaning behind it. The real meaning is “above ground level”. But 9m will not alter the elevation too much. Make sure the sun integration is working accordingly though.
The Elevation above Sea Level has always been ‘0’, I just looked up the Elevations above Sea Level for my Address and it said it is 9m, which is what I changed it to.
Following what you have said, I have changed it back to ‘0’.
Home assistant doesn’t use elevation above sea level. The elevation in general settings is “height above ground level”. So if you’re in a highrise building on the 100th floor, you’d change that elevation to the height above ground.
Again, the label in general settings page is wrong. It falsely says “elevation above sea level”. You’re welcome to continue to use 9, but I’m fairly sure you don’t live 9 meters above the ground unless your house is floating.