So this one needs some help, I cant figure out myself.
I have set up a generic thermostat.
It is a heat only and it controls a heater switch.
I want to make users able to change the target temperature. But that only has to be possible, if an different switch is on.
How can I achieve that?
The purpose:
The thermostat regulates the pool temperature. It is always set to minimum temperature after the pool is powered off. That temperature setpoint is very low, like 10 degrees (which will never be met with an in-house pool), just to avoid switching the heater on.
When the pool is powered on, the water circulation pump switches on and then the temperature target is set automatically to 35 degrees.
After that, everyone may be able to change the temperature to his/hers needs.
But, I want it to be impossible to change the target temperature, when the circulation pump is not on. This may damage the heater.
Whatever it takes, just if they are unable to change the target temp, if the switch of the pump is not on.
There is only one mode defined - heat. No Away, Comfort and such…
I’m also already figuring out a slight change to the wiring, so even if the heater would be switched on, it just does not get any power when the pump is not on. That is actually the better way.
The other way (than using a conditional card) is to write an automation that watches for any change of the set temperature and changes it back to the trigger.from_state if the pump is off (state condition).
trigger:
- platform: state
entity_id: climate.pool_heater
attribute: temperature
condition:
- condition: state
entity_id: switch.pool_pump
state: 'off'
action:
- service: climate.set_temperature
target:
entity_id: climate.pool_heater
data:
temperature: "{{ trigger.from_state.attributes.temperature }}"
I think that template is correct but it is untested.