Skip to content

Instantly share code, notes, and snippets.

@MoLow
Created March 27, 2020 13:14
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 MoLow/74c006340a2af989a9cbbf3fdcb8a217 to your computer and use it in GitHub Desktop.
Save MoLow/74c006340a2af989a9cbbf3fdcb8a217 to your computer and use it in GitHub Desktop.
ha automations
automation:
- id: remind_turning_off_ac
alias: remind_turning_off_ac
trigger:
- platform: state
entity_id:
- climate.parents
- climate.living_room
- climate.study
- climate.mamad
- climate.children
to: 'heat'
for: 03:00:00
condition:
- condition: state
entity_id: sensor.shabbat_is_shabbat
state: 'False'
- condition: state
entity_id: sensor.holiday_is_yom_tov
state: 'False'
action:
- service: notify.notify_family
data_template:
message: >-
המזגן ב{{ trigger.from_state.attributes.friendly_name}} דלוק כבר מלא זמן!
({{ trigger.for }})
data:
tag: remind_turning_off_ac
actions:
- action: '{{trigger.entity_id}}'
title: "לכבות מזגן"
- id: shut_down_ac_from_mobile
alias: shut_down_ac_from_mobile
trigger:
platform: event
event_type: mobile_app_notification_action
event_data:
action_1_title: "לכבות מזגן"
action:
- service: homeassistant.turn_off
data_template:
entity_id: '{{trigger.event.data.action}}'
- service: notify.notify_family
data:
message: clear_notification
data:
tag: remind_turning_off_ac
notify:
- platform: group
name: notify_family
services:
- service: mobile_app_moshe
- service: mobile_app_shlomit
automation:
- id: remind_turning_ligt_off
alias: remind_turning_ligt_off
trigger:
platform: time
at: "01:00:00"
condition:
- condition: state
entity_id: sensor.shabbat_is_shabbat
state: 'False'
- condition: state
entity_id: sensor.holiday_is_yom_tov
state: 'False'
- condition: state
entity_id: group.night_turn_off
state: 'on'
action:
- service: notify.notify_family
data:
message: 'יש אורות דולקים בבית'
data:
tag: remind_turning_ligt_off
actions:
- action: "shut_down_lights"
title: "כיבוי אורות"
- id: shut_down_lights
alias: shut_down_lights
trigger:
platform: event
event_type: mobile_app_notification_action
event_data:
action: shut_down_lights
action:
- service: homeassistant.turn_off
entity_id: group.night_turn_off
- service: notify.notify_family
data:
message: clear_notification
data:
tag: remind_turning_ligt_off
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment