Hello
I am Trying to create a blueprint who open or close my cover regarding sun azimuth / elevation, outdoor temperature and cover position.
Unfortunatelly, I am not able to get the cover state. I am currently using ligth for the test
variables:
over_elevation: !input 'over_elevation'
over_azimuth: !input 'over_azimuth'
below_azimuth: !input 'below_azimuth'
outdoor_temp: !input 'outdoor_temp_sensor'
temp_ext_max: !input 'temp_ext_max'
cover_target: !input 'cover_target'
sun_elevation: '{{ state_attr(''sun.sun'',''elevation'') }}'
sun_azimuth: '{{ state_attr(''sun.sun'',''azimuth'') }}'
#condition:
# - condition: or
# conditions:
# - condition: sun
# after: sunrise
# - condition: sun
# before: sunset
action:
- service: >
{% if ( (sun_elevation | float) > (over_elevation | float) and (sun_azimuth | float) > (over_azimuth | float) and (sun_azimuth | float) < (below_azimuth | float) and states(cover_target) == "open") ) %}
light.turn_on
{% else %}
light.turn_off
{% endif %}
target: !input target_light
thanks for your help