Hi all,
I’m using HA for about a year and I’m really enjoying the system and the community support. I think I reached pretty far without asking any question anywhere haha
Attaching some prequel, but you are welcome to jump to the questions
The main problem is that my AC is not a “smart AC” that can connect to WIFI, and I control it with an IR blaster.
So, I have prerecorded a lot of functions for my AC in the last year.
the way this controller works is by generating different codes ( “blasts” or whatever you want to call it ) for each possible outcome, considering lots of variables ( heat/cold/fan, tempratures ( 16-30 ), fan speed ( low, med, high ) and even stuff like the direction of the wind ).
Along the last year I prerecorded all the relevant functions and gave each a uniqe button in the lovelace interface.
Now, I want to unify it, in order of making it simpler and easier to use. This led me to a kinda-hard-to-google niches of HA scripting like “calling a script from another script”, or “using conditions” but a bit different than the examples I’ve seen.
Here are picture to show…
- The “limited” options I have today: https://i.imgur.com/ZWocuS1.png ( I mean… I changed the cold(blue) buttons along the summer and the heat(reds) doesn’t even have their “high” mode yet! "
- Tomorrow’s controller: https://i.imgur.com/DinTs0R.png
So, to my first question:
I thought I can set variables but I couldn’t find to best use them in conditions without taking several lines for each condition. something like this for example:
{% set temperature = states("input_select.dropdownbox_temprature") %} # a number between 24 to 30 ( I don't need 16-23 )
{% set fanSpeed= states("input_select.helper_dropdownbox_LMH") %} # Fan speed: Low/Med/High
{% set isHeat = states("input_boolean.helper_toggle_isonheat") %} # heat: Yes/No
My second question is how to execute an existing script like “script_ac_heat28low”, “script_ac_heat28med” from the current - “script_unified_AC_RC”?