Skip to content

Instantly share code, notes, and snippets.

@shoeffner
Last active April 12, 2021 11:08
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 shoeffner/c167fcb5fd18ea9ff8cc2858aabb28fa to your computer and use it in GitHub Desktop.
Save shoeffner/c167fcb5fd18ea9ff8cc2858aabb28fa to your computer and use it in GitHub Desktop.
Blueprint notification
blueprint:
name: Send notification to open a window
description: >-
An automation sends a notification to open a specified window if a) the
humidity of the specified sensor exceeds the humidity threshold and b) the
temperature is not below the temperature threshold.
domain: automation
input:
window:
name: Window
selector:
entity:
domain: binary_sensor
device_class: opening
temperature_sensor:
name: Temperature sensor
selector:
entity:
domain: sensor
device_class: temperature
humidity_sensor:
name: Humidity sensor
selector:
entity:
domain: sensor
device_class: humidity
humidity_threshold:
name: Humidity threshold (above triggers)
default: 65
selector:
number:
min: 0
max: 100
unit_of_measurement: '%'
temperature_threshold:
name: Temperature threshold (above triggers)
default: 15
selector:
number:
min: -15
max: 45
unit_of_measurement: '°C'
duration:
name: Duration
default: 600
selector:
number:
min: 0
max: 86400
unit_of_measurement: seconds
mode: box
area:
name: Area
selector:
area:
check_interval:
name: Check every
default: 10
selector:
number:
min: 1
max: 60
unit_of_measurement: 'min'
notification_service:
name: Notification service (or group), see https://www.home-assistant.io/integrations/notify.group/
default: notify.notify
selector:
action:
alias: Send notification to open a window
description: >-
An automation sends a notification to open a specified window if a) the
humidity of the specified sensor exceeds the humidity threshold and b) the
temperature is not below the temperature threshold.
trigger:
- platform: time_pattern
minutes: !input check_interval
condition:
- condition: state
entity_id: !input window
state: 'Off'
- condition: numeric_state
entity_id: !input humidity_sensor
above: !input humidity_threshold
- condition: numeric_state
entity_id: !input temperature_sensor
above: !input temperature_threshold
action:
- service: !input notification_service
data:
message: !input area
title: Please open the window!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment