alias: Open Windows Alert
description: Tell me to open the upstairs windows when it's hot outside
trigger:
- platform: time_pattern
hours: "*"
minutes: /10
condition:
- condition: state
entity_id: input_boolean.temperature_alert
state: "off"
- condition: numeric_state
entity_id: sensor.upstairs_temperature_template
above: 75
- condition: template
value_template: >-
{{ states('sensor.upstairs_temperature_template') >
states('sensor.KMOP_temperature') }}
- condition: time
after: "16:30:00"
before: "23:59:00"
weekday:
- sat
- fri
- thu
- wed
- tue
- mon
- sun
action:
- service: notify.mobile_app_neals_iphone
data:
message: Open the Windows
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.temperature_alert
mode: single