Skip to content

Instantly share code, notes, and snippets.

@robsonke
Last active February 23, 2022 20:37
Show Gist options
  • Save robsonke/753f9841c2337b58f4863942934b43a3 to your computer and use it in GitHub Desktop.
Save robsonke/753f9841c2337b58f4863942934b43a3 to your computer and use it in GitHub Desktop.
Home Assistant Blueprint - Inform in case window is open and the temperature becomes below a specific value. Or inform when you open a window and it's already freezing cold.
blueprint:
name: Window Open Warning
description: Inform users when windows are open and the temperature is dropping too much.
domain: automation
input:
temp_sensor:
name: Temperature Sensor
description: Temperature Sensor to check.
selector:
entity:
domain: sensor
device_class: temperature
min_temp:
name: Minimum Temp
description: If temperature is below this value, notify people.
default: 15
selector:
number:
min: 5.0
max: 25.0
step: 1.0
mode: slider
window_sensor:
name: Window / Door Sensor
description: Window Binary Sensor to check if opened. Entity can also be a group of window/door entities.
selector:
entity:
actions:
name: Actions when it's too cold
description: Actions (e.g. pushing a notification, TTS announcement, ...)
selector:
action: {}
variables:
window_sensor: !input window_sensor
trigger:
- platform: homeassistant
event: start
- platform: event
event_type: automation_reloaded
- below: !input min_temp
entity_id: !input temp_sensor
platform: numeric_state
- platform: state
entity_id: !input window_sensor
to: 'on'
condition:
- below: !input 'min_temp'
entity_id: !input 'temp_sensor'
condition: numeric_state
- condition: state
entity_id: !input 'window_sensor'
state: 'on'
action:
- choose: []
default: !input 'actions'
mode: single
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment