Hi. I live in a small 2 bed apartment with central gas heating. I have a Hive thermostar that control the boiller. It works fine, but the house doesn’t have zones. Its all either on or off. Since its a small apartment, its usually fine.
My goal is to have my baby’s room always withing the target temperature of the main thermostar. (sometimes it gets slightly bellow).
So, i added a standalone zigbee temperature probe in the baby’s room, and, i want to create an automation that says:
If the baby’s room temperature is bellow the main Hive target temperature, then force the heating on, until that room reaches the original target. (I don’t care if the rest of the house gets slightly hotter).
Here is my automation yaml:
triggers:
- trigger: numeric_state
entity_id:
- sensor.baby_thermostat_temperature
below: sensor.ohana_target_temperature
conditions:
- condition: time
after: "20:00:00"
before: "08:00:00"
weekday:
- sun
- mon
- tue
- wed
- thu
- fri
- sat
- condition: device
device_id: 5fbaeede631d14024f4e9d31a77315df
domain: climate
entity_id: 6582da9b536e09b2f4178c121a72b8df
type: is_hvac_mode
hvac_mode: heat
alias: Hive Thermostat set to Manual Mode
actions:
- alias: Store Original Target Temperature
variables:
original_target: "{{ states('sensor.ohana_target_temperature') | float }}"
- data:
message: >-
Baby's room is too cold. Turning on heating until it reaches {{
original_target }}°C.
action: telegram_bot.send_message
- alias: Increase Temperature
target:
device_id: 5fbaeede631d14024f4e9d31a77315df
data:
temperature: 25
action: climate.set_temperature
- alias: Wait for Temperature Above Original Target
wait_for_trigger:
- value_template: >-
{{ states('sensor.baby_thermostat_temperature') | float >
original_target }}
trigger: template
continue_on_timeout: false
- alias: Send Message on Target Reached
data:
message: >-
Temperature reached! Returning to original setting of {{ original_target
}}°C.
action: telegram_bot.send_message
- alias: Restore Original Target Temperature
target:
device_id: 5fbaeede631d14024f4e9d31a77315df
data:
temperature: "{{ original_target }}"
action: climate.set_temperature
mode: single
But the automation is getting stuck in “Wait for Temperature Above Original Target”, the condition is never satisfied, even though the sensor.baby_thermostat_temperature is clearly above the original_targe.
What am i doing wrong? perhaps the variable is not being read properly in the test?