Would it work to just trigger it off of any other state in the input select? You can have multiple triggers. So you can trigger off of every option on your input select except auto which would trigger it when it does not equal auto.
Another option is to leave the state option out of the trigger. Just have the platform and entity_id. This will trigger each time the input_select state changes. Then put condition for the states you want the automation to run.
As always, thereâs more than one way to do it
I realized that it would be better to check the input_select state in the condition clause, not as a trigger (doesnât change much regarding my original question).
I ended up using this:
condition:
condition: template
value_template: "{% if not is_state('input_select.housemode', 'auto') %}true{% endif %}"
I think thatâs about the most compact way to do this.
If I use the template dev tool and try:
value_template: â{% if not is_state(âinput_select.living_roomâ, âPowered Offâ) %}true{% endif %}â
I get value_template: âtrueâ
itâs always true no matter what I change powered off to. If I go the the states page and check, it is âPowered Offâ
Iâve also tried, value_template: â{{ states.input_select.living_room" != âPowered Offâ }}â
which I think used to work.
I donât see anything wrong with your syntax.
I can also confirm that the exampe I posted above does work for me.
Check for typos - also in the name of the input_select control.
I noticed that your code returns true for me too - and I donât even have an input_select named living_room.
When in doubt, use the dev tool to display all the current values/states for the variables involved.
I know - what I was trying to say was, that the code returns true even if the condition you want to check might never actually be checked, because of a typo (and thus youâre actually checking against an undefined object without noticing).
The ânotâ operator is particularly dangerous here - because at least I subconsciously always have the feeling that âitâs workingâ when âstuffâ returns trueâŚ
So when working with templates, Iâd always use the dev-tool to verify the values of all variables involved and do a few test runs with different input values (e.g. slider/switch settings) to make sure everything behaves as expected.
Thank you. When I upgraded harmony awhile back, the name changed from living_room to livingroom. I should have caught that.
value_template: "{% if not is_state('input_select.livingroom', 'Powered Off') %}true{% endif %}"
returns value_template: ââ
If I changed any letter in Powered Off it then returns true.
{{ states.input_select.livingroom.state }}
returns Powered Off