Hello, newbye here
I would like to control my heating system based on Better Thermostat states
I want a zigbee switch to turn on if any of the BT entity is in heating state
This block
{{
(state_attr('climate.bt_cucina','hvac_action')) =='heating' or
(state_attr('climate.bt_soggiorno','hvac_action')) =='heating' or
(state_attr('climate.bt_davide','hvac_action')) =='heating' or
(state_attr('climate.bt_matrimoniale','hvac_action')) =='heating'
}}
Thanks again
I am trying to use a wifi thermostat (climate.casa) instead of a switch and set its target temperature to low/high (15/25 °C) values when a given trigger is fired
I tried to modify your code like below, but it doesn’t seem to work
Where is my error?
P
Now that you have replaced the switch with a climate entity, the automation’s Template Triggers don’t appear to be the neatest way of triggering the automation.
Did you manually run the automation to test it? You can’t do that because the trigger variable won’t be defined.
If you want to test the automation, go into the developer tools → states and find your climate entity, and then you can change the hvac_action attribute from idle to heating or vice-versa.
Update
With the latest code I see the climate.casa is turned on off when any of the BT instances changes state.
This is not as I like it to work.
Climate.casa should be risen if any of the BT instances is in heating state and lowered when all BT are in idle state.
With the latest code if a single BT instance reach target temperature then climate.casa is set to 15C not considering the state of the others…
Thanks again
I tried to rise/lower the temperature of the single BT instances and if all go to idle the climate.casa is set to 15C.
If just one (or more) are in heating then the climate.casa is set to 25C
For future reference, it’s the custom of this community to assign the Solution tag to the first post that provides the answer/solution to the original question/problem.
In this case, you had originally asked for this:
The solution was immediately provided to you here:
You then changed your requirements, asking for to also turn off the switch and I also immediately provided a solution here:
Then you changed your requirements yet again and asked for it to set the temperature of a climate entity. You modified my second example and ultimately chose to mark your own post as the Solution, despite the fact it’s completely based on a suggested solution to a previous requirement.
It’s super easy to make it work the way you want by simply adding a condition. Anyway, good luck solving other problems in the future.
You are right, Sorry.
I modified the solution tag.
I didn’t mean to attribute to me the solution.
Just it was the adapted solution to my needs and it worked, so I thought to sign it as solution.
As I said I just started to understand the HA code.
And I don’t know the logics behind it.
I discovered that I could set the temperature of a Tuya thermostat via automation, so my switch is not needed.
So my questions were modified.
I made a mess, again sorry.
Thanks again for your precious help.