I’ve switched from OpenHAB to Home Assistant and I’m really struggling with one problem.
I have quite a lot Homematic IP thermostats (HmIP-BWTH) that control my heating.
These thermostats have an entity “active_profile” which is a number an represents the heating mode that the thermostat uses.
I’m using 4 profiles:
1 => Normal
2 => Present Free
3 => Present Work
4 => Not Present
What I want now is controlling this heating mode with a dropdown.
So I created a Dropdown-Helper with the four states as options (Normal, Present Free, Present Work, Not Present).
And two automation. One automation that changes the dropdown when the entity changes and one automation that changes the entity when the dropdown changes.
So far this seems to work fine. The problem is, that I have 15 of these thermostats.
So with the concept I have now I would need to create 15 helpers and 30 automation.
Is this the right way to do it? Is there another was without creating all this helpers and automations? Is there maybe a way to reuse the helper any automation dynamically with different entities?
This is one of the standard use cases for a Template Select.
There are other ways to accomplish your goal that use fewer entities, but they would have a different order of operations compared to what you are currently using.
Yes, you would have one Select entity for each thermostat.
It is unclear what you are asking… Generally speaking, yes, Select entities can be used in Blueprints. Just make sure to use the appropriate service calls in your actions.
Whether or not a specific Blueprint has been configured to be able to use them is a different question.
There’s a way to do this using a single automation and two Input Selects that can handle all 15 number entities. However, you will have to decide if the way it operates meets your needs and expectations.
The first Input Select contains a list of all your 15 number entities.
The second Input Select contains a list of all 4 profiles (like what you already have with input_select.test_heating_state`).
An automation connects the operation of the two Input Selects. When you use the first Input Select to choose a number entity, the second Input Select changes to display the chosen number’s current value. If you then use the second Input Select to change the value, the automation sets the associated number to the new value.
This allows you to use very few resources to display and control each one of the 15 number entities.
Let me know if this interests you or it isn’t the way you want to display/control the 15 entities.
Just one more question could the above code use some sort of entity-id pattern (e.g. “where enityId like ‘*_fussbodenheizung_active_profile’” or “where entity is in area xyz”).
I know it doesn’t make sense in this use case, but I need something similar for a switch, where I get and set the state for several light- and switch-entities (something like a dynamical switch/light group).
Is there a tutorial or documentation that goes deeper into stuff like this.