#But how can I do that. I‘m a rookie with
1 messages · Page 1 of 1 (latest)
To make an input_boolean helper: Settings > Devices & services > Helpers tab > Create Helper button at the bottom > Toggle > give a name, such as opener > Create
To make the automation: Settings > Automations & scenes > Create automation button at the bottom > Create new automation.
Under Actions, Add Action > Call Service > input_boolean.turn_on > Choose entity > input_boolean.opener
Add Action > Call Service > lock.open > Choose entity > input_boolean.opener > Choose entity > lock.opener
Add Action > Call Service > input_boolean.turn_off > Choose entity > input_boolean.opener
I will try that later in the afternoon thank you so much for you‘r help.
Okay I got this but what is the code now to change the Icon Color to red or green dependend on the state
{% if is_state('input_boolean.turgeoffnet' = 'false') %}
red
{% elif is_state('input_boolean.turgeoffnet' = 'true') %}
green
{% else %}
grey
{% endif %}
something like that?
I don't think the true/false goes in quotes. Otherwise, it will be trying to compare it to a string.
Okay but without the quotes it also doesn't work
also tried on and off
{% if states('input_boolean.turgeoffnet') == false %}
red
{% elif states('input_boolean.turgeoffnet') == true %}
green
{% else %}
grey
{% endif %}```
Okay I think that works now because if i replace the grey it actually goes to that color!
Mhm but I don't get it working I can see that the State of the helper goes to on and off again an my door gets opend but the Icon Colors don't change...
{% if states('input_boolean.turgeoffnet') == 'off' %}
red
{% elif states('input_boolean.turgeoffnet') == 'on' %}
green
{% else %}
grey
{% endif %}