Skip to content

Instantly share code, notes, and snippets.

@rock3r
Created August 6, 2023 11:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rock3r/5954b87184c6536bb8f2ea922bc97f02 to your computer and use it in GitHub Desktop.
Save rock3r/5954b87184c6536bb8f2ea922bc97f02 to your computer and use it in GitHub Desktop.
Home Assistant blueprint to turn a HVAC on or off based on a binary sensor
blueprint:
name: HVAC automation
source_url: https://gist.github.com/rock3r/5954b87184c6536bb8f2ea922bc97f02
description: Turn a HVAC on or off based on a binary sensor
domain: automation
input:
opening_sensor:
name: Window/Door sensor
description: The window or door sensor to use to drive the Tado valve
selector:
entity:
domain: binary_sensor
device_class: window
target_hvac:
name: Target HVAC
description: The HVAC climate control to target
selector:
entity:
domain: climate
trigger:
- platform: state
entity_id: !input opening_sensor
action:
- service: climate.set_hvac_mode
data:
hvac_mode: >
{% if trigger.to_state.state == 'on' %}off{% else %}auto{% endif %}
target:
entity_id: !input target_hvac
- service: notify.mobile_app_pixel_7_pro_seb
data_template:
message: >
{{ trigger.to_state.name }}: {% if trigger.to_state.state == 'on'
%}disattivato riscaldamento (finestra aperta){% else %}riattivato
riscaldamento (finestra chiusa){% endif %}
title: Automazione Tado
mode: single
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment