Hi,
Looking for an automation when the requested temperature of my climate is higher than the current temperature, I would like to turn on a switch. How would you set this up?
Climate.ketelruimte
switch.pomp_vloerverwarming
This should do it. You’d need something similar to turn it off of course:
triggers:
- trigger: state
entity_id:
- climate.ketelruimte
attribute: hvac_action
to: heating
conditions: []
actions:
- action: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.pomp_vloerverwarming
To turn it off again:
triggers:
- trigger: state
entity_id:
- climate.ketelruimte
attribute: hvac_action
from: heating
for:
minutes: 10
conditions: []
actions:
- action: switch.turn_off
metadata: {}
data: {}
target:
entity_id: switch.pomp_vloerverwarming
This assumes that the climate entity will be set to heating if target temperature is higher than the current temperature, which is usually the case, but its not specifically checking if the actual condition stated is true.
True, but if heating is off, turning on the pump regardless or vice versa could be a big problem. One could compare temperatures, but the thermostat likely uses a hysteresis. So, while doing literally what was asked, it might very well not be what was intended. What would be the point of using a climate entity if the pump is not related to the heating?
Imho it is not wise to use Home Assistant for things like these, but use an esp for it anyway. The risk of HA not being active while switching needs to happen is high. So personally I would go for something simpler and more reliable.
Ps. I edited in a 10 minute delay for the pump to keep running if the heating stops. It is probably not wise to stop the pump immediately. The 10 minutes is just an example, you could put in whatever is required.
Thanks all, and to clarify: I have a heat pump that will heat up the buffer tank of 200 liters and on that tank there is pump connected that now always was pumping heat in the flooring system. With linking the switch to the thermostat, it just shuts off the power of the pump. And the thermostat is not connected to the heat pump.