Skip to content

Instantly share code, notes, and snippets.

@niro1987
Created June 24, 2022 10:36
Show Gist options
  • Save niro1987/661fadfcc6d316ad12928552846b7141 to your computer and use it in GitHub Desktop.
Save niro1987/661fadfcc6d316ad12928552846b7141 to your computer and use it in GitHub Desktop.
Home Assistant Blueprint to send a notification if the outdoor temp is higher then the indoor temp
blueprint:
name: Window Temperature Notification
description: Send a notification to open/close the windows
domain: automation
input:
outdoor_temp:
name: Outdoor Temperature
description: The outdoor temperature sensor.
selector:
entity:
domain: sensor
indoor_temp:
name: Indoor Temperature
description: The indoor temperature sensor.
selector:
entity:
domain: sensor
required_offset:
name: Offset
description: >
The minimal difference required for the notification to be sent.
selector:
number:
max: 10
min: -10
mode: box
step: 0.1
default: 0.0
notify_device:
name: Device
description: The device to send a notification to
selector:
device:
integration: mobile_app
notify_title:
name: Title
description: The message title
selector:
text:
type: text
multiline: false
notify_message:
name: Message
description: The message
selector:
text:
type: text
multiline: true
mode: single
max_exceeded: silent
variables:
outdoor: !input outdoor_temp
indoor: !input indoor_temp
offset: !input required_offset
trigger:
- platform: state
entity_id:
- !input outdoor_temp
- !input indoor_temp
condition:
- condition: template
value_template: >
{{ (states(outdoor)|float - states(indoor)|float) > offset|float }}
action:
- domain: mobile_app
type: notify
device_id: !input notify_device
title: !input notify_title
message: !input notify_message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment