I created a blueprint to for all my window sensors and radiators to automatically turn the selected radiator off if for some reason the radiator is turned to heat mode while the window is open. I’m seeing an error in my logs and the automations are failing to trigger because even though I have hard coded in the blueprint the ‘off’ value hassio is sending ‘false’ to the radiator which is an invalid hvac_mode.
Blue print
blueprint:
name: Check Window
description: Check if the window is open before allowing heat
domain: automation
input:
window_sensor:
name: Window Sensor
selector:
entity:
domain: binary_sensor
target_climate:
name: Climate
selector:
entity:
domain: climate
trigger:
- platform: state
entity_id: !input target_climate
attribute: system_mode
to: heat
for: 00:00:10
condition:
- condition: state
entity_id: !input window_sensor
state: 'on'
action:
- service: climate.set_hvac_mode
entity_id: !input target_climate
data:
hvac_mode: off
Automation trace
Executed: May 20, 2021, 8:49:56 AM
Result:
params:
domain: climate
service: set_hvac_mode
service_data:
hvac_mode: false
entity_id:
- climate.bath_1_heat
target:
entity_id:
- climate.bath_1_heat
running_script: false
limit: 10
Error message
Bath 1 Check Window: Error executing script. Invalid data for call_service at pos 1: value must be one of ['auto', 'cool', 'dry', 'fan_only', 'heat', 'heat_cool', 'off'] for dictionary value @ data['hvac_mode']
The trace clearly shows it is sending ‘false’ as a value when my blueprint had ‘off’ written.