so i have a fan and its weird
it has speed 0-8 (represented by HA as a percent, but it quantizes), and a maximum speed that you have to get to by setting "turbo" mode on the fan
i am mostly done with a pair of automations to abstract this away to a helper from 0-9, but i am having issues that they ping pong back and forth
cause i have one automation to go helper -> fan
and another to go fan -> helper (eg if i turn off the fan irl)
and the automations seem to trigger each other and not update properly
how can i have this two-way stateupdating thing without the automations firin goff each other
#link a helper and an attribute with some logic
1 messages · Page 1 of 1 (latest)
I would not use an automation for this
A template number helper can bundle all of this into one entity and you can use a Choose/If block to change the action it does based on a template condition based on (e.g.) {{ value < 9 }}
something like this for state
{% if states('fan.fan_2') == 'turbo' %}
9
{% elif states('fan.fan_2') == 'normal' %}
{{ state_attr('fan.fan_2', 'percentage') | int * 8/100 | round()) }}
{% else %}
unavailable
{% endif %}