Following trigger below is working. However I like to add a waiting / sampling period of X minutes before it triggers.
Background: In the living there is floor heating and a radiator can deliver supplemental heating.
The MDT heating actuator can be setup (in ETS) with a block object. When block object is “1” then the radiator heating controller is disabled. The condition to disable the radiator heating is when delta temperature between actual living room and the controller setpoint is <= 0,5 degrees C. In that case the living room continues to be heated with the floor heating, without the radiator. There is another trigger to switch the radiator back on (block = “0”) when the delta temp is > 0.5 degrees. The action is that a knx.send telegram is sended. The triggers are working. However on the moments where the delta temperature is close to 0.5 degrees there is a lot of switching. The HA triggers do fire frequently (setting the block disabled and re-enabled quite a few times) until the living room temperature withing <0,4 degrees of the setpoint. Then the temperature climbs gradually on the floor heating only.
I like to trigger when a state is constant for 5 minutes.
- condition: template
value_template: “{{ (states(‘sensor.knx_living_room_setpoint’) | float -\n states(‘sensor.living_temp’)
| float) > 0.5 }}\n”
I have tried to add following tow lines to the trigger script. But this will cause an error in the script.
for:
minutes: 5
- id: '1636642946012'
alias: LivingRoomRadiator_Off
description: ''
trigger:
- platform: state
entity_id:
- sensor.knx_living_room_setpoint
- sensor.living_temp
condition:
- condition: template
value_template: "{{ (states('sensor.knx_living_room_setpoint') | float -\n states('sensor.living_temp')
| float) <= 0.5 }}\n"
action:
- action: knx.send
metadata: {}
data:
response: false
address: 1/2/36
payload: 1
mode: single