Hi,
I can’t figure out why it is not working as it suppose it should.
First of all, here is my code:
blueprint:
name: Rolluiken automatisch
description: Laat rolluik automatisch omhoog of omlaag gaan op basis van het weer
domain: automation
input:
rolluik:
selector:
target:
entity:
domain: cover
achter_voor:
name: Achterzijde of voorzijde
selector:
select:
options:
- label: Achterzijde
value: achter
- label: Voorzijde
value: voor
variables:
achter_voor_var: !input achter_voor
below_var: >
{% if achter_voor_var == 'voor' %}
200
{% else %}
360
{% endif %}
trigger:
- platform: time_pattern
minutes: '20'
condition:
- condition: sun
after: sunrise
before: sunset
action:
## for debugging purpose, this shows the correct value
- service: notify.mobile_app_iphone_van_l_j_h
data:
message: '{{below_var}}'
- if:
- condition: or
conditions:
- condition: numeric_state
entity_id: sensor.gemiddelde_buitentemperatuur
above: '23'
- condition: and
conditions:
- condition: numeric_state
entity_id: sensor.gemiddelde_buitentemperatuur
above: '15'
- condition: numeric_state
entity_id: sun.sun
attribute: elevation
above: '4'
- condition: numeric_state
entity_id: sensor.openweathermap_cloud_coverage
below: '80'
- condition: numeric_state
entity_id: sun.sun
attribute: azimuth
below: '{{below_var}}'
## tried also this code, won't work either
#below: >
# {% if achter_voor_var == 'voor' %}
# 200.0
# {% else %}
# 360
# {% endif %}
#above: >
# {% if is_state(achter_voor , 'voor') %}
# '220'
# {% else %}
# '0'
# {% endif %}
then:
- service: cover.close_cover
target: !input rolluik
else:
- service: cover.open_cover
target: !input rolluik
Automation:
- id: '1655709574308'
alias: Rolluiken test
description: ''
use_blueprint:
path: rolluiken_automatisch.yaml
input:
achter_voor: voor
rolluik:
entity_id: cover.rolluik_keuken
This is the error what I get:
Blueprint Rolluiken automatisch generated invalid automation with inputs OrderedDict([('achter_voor', 'voor'), ('rolluik', OrderedDict([('entity_id', 'cover.rolluik_keuken')]))]): expected float for dictionary value @ data['action'][1]['if'][0]['conditions'][1]['conditions'][3]['below']. Got None
Why do I get the error that the value is None
. On my mobile I get the value I expected.
Did I miss something?