Hi,
I created the automation below to get my curtains closed by 50% when the sun enters the room using sun elevation entity:
alias: Curtains 50%
description: “”
trigger:
- platform: state
entity_id:- sensor.sun_solar_elevation
to: “35.27”
condition:
- sensor.sun_solar_elevation
- condition: state
entity_id: sensor.season
state: autumn
enabled: true - condition: or
conditions:- condition: state
entity_id: weather.openweathermap
state: sunny - condition: state
entity_id: weather.openweathermap
state: partlycloudy
enabled: true
action:
- condition: state
- device_id: 33bb59f4188a3bd7b4c70729b66624a8
domain: cover
entity_id: cf834aabdb3ee392ef029d3e1d096219
type: set_position
position: 50
mode: single
But, you see I was hoping that the value to be calculated is a range rather than a fixed number. I tested the automation and it worked one time when the solar elevation reached 35.27. But I do not think the value will be the same on other days, so the automation may not work again.
Is there any way to use a range?