This commit is contained in:
CCOSTAN 2023-11-17 06:59:29 +00:00
parent 0a471c4363
commit 71b980975b
2 changed files with 94 additions and 15 deletions

View File

@ -22,7 +22,6 @@
# payload_close: "close" # payload_close: "close"
# payload_stop: "stop" # payload_stop: "stop"
mqtt: mqtt:
cover: cover:
- name: "Large Garage Door" - name: "Large Garage Door"
@ -69,10 +68,66 @@ group:
# - cover.small_garage_door # - cover.small_garage_door
###################################################################### ######################################################################
## Garage Status Announcements - Only during normal hours. ## Send a notification to anyone coming home asking if they want to open the garage door.
###################################################################### ######################################################################
automation: automation:
- alias: 'Garage Helper'
id: 365adc21-5e96-4e78-9e94-089901a29430
mode: parallel
trigger:
- platform: state
entity_id:
- person.carlo
- person.stacey
from: 'not_home'
to: 'home'
condition:
- condition: state
entity_id: cover.large_garage_door
state: 'closed'
action:
- variables:
person_triggered: "{{ trigger.to_state.entity_id.split('.')[1] }}"
- service: script.notify_engine_two_button
data:
title: 'Welcome Home!'
value1: 'Open Garage Door?'
title1: 'Yes'
action1: 'OPEN_LARGE_GARAGE'
icon1: 'sfsymbols:arrow.up.circle'
destructive1: 'false'
title2: 'No'
action2: 'NO_OPEN_LARGE_GARAGE'
icon2: 'sfsymbols:house.circle'
destructive2: 'true'
who: "{{ person_triggered }}"
apns_id: 'Welcome_Home'
- alias: 'Open Large Garage Door Action'
id: 85e02a74-2ecc-4815-95a6-db864a6dffd7
trigger:
platform: event
event_type: mobile_app_notification_action
event_data:
action: OPEN_LARGE_GARAGE
condition:
- condition: state
entity_id: cover.large_garage_door
state: 'closed'
- condition: state
entity_id: group.family
state: 'home'
action:
- service: cover.open_cover
entity_id: cover.large_garage_door
######################################################################
## Garage Status Announcements - Only during normal hours.
######################################################################
- alias: 'Update Garage Get-Status' - alias: 'Update Garage Get-Status'
id: 2b9e8359-c189-4399-b415-50107513fe90 id: 2b9e8359-c189-4399-b415-50107513fe90
trigger: trigger:
@ -242,3 +297,4 @@ automation:
- service: script.speech_engine - service: script.speech_engine
data: data:
value1: "Please check the garage doors. The Small garage is {{ states('cover.small_garage_door')}} and the large garage is {{ states('cover.large_garage_door')}}" value1: "Please check the garage doors. The Small garage is {{ states('cover.small_garage_door')}} and the large garage is {{ states('cover.large_garage_door')}}"

View File

@ -1,5 +1,5 @@
###################################################################################################### ######################################################################################################
###Script to send notifications to IFTTT to notify me on the mobile Phone! Call like this: ###Script to send notifications to the mobile Phone! Call like this:
# action: # action:
# service: script.notify_engine # service: script.notify_engine
# data: # data:
@ -12,8 +12,6 @@
# content-type: "jpeg" # content-type: "jpeg"
# apns_id: "Something_Unique" if important or information # apns_id: "Something_Unique" if important or information
# IFTTT Maker channel should look like this: https://files.gitter.im/home-assistant/home-assistant/phkx/blob
# @CCOSTAN # @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig # Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
@ -27,8 +25,6 @@ notify_engine:
- condition: state - condition: state
entity_id: input_boolean.text_notifications entity_id: input_boolean.text_notifications
state: 'on' state: 'on'
# - service: ifttt.trigger
# data: {"event":"notify_engine", "value1":"{{ value1 }}", "value2":"{{ value2 }}", "value3":"{{ value3 }}"}
- service: > - service: >
{% if who == 'stacey' %} {% if who == 'stacey' %}
@ -49,13 +45,40 @@ notify_engine:
apns_headers: apns_headers:
'apns-collapse-id': "{{ apns_id }}" 'apns-collapse-id': "{{ apns_id }}"
push: push:
# sound: "{{ ios_sound }}"
# badge: "{{ ios_badge }}"
# interruption-level: time-sensitive
# interruption-level: critical
category: "{{ ios_category }}" category: "{{ ios_category }}"
entity_id: "{{ camera_entity }}" entity_id: "{{ camera_entity }}"
# attachment:
# url: "{{ url }}" notify_engine_two_button:
# content-type: "{{ content_type }}" sequence:
# hide-thumbnail: false - condition: or
conditions:
- condition: state
entity_id: input_boolean.text_notifications
state: 'on'
- service: >
{% if who == 'stacey' %}
notify.mobile_app_stacey_iphone11
{% elif who == 'carlo' %}
notify.mobile_app_carlo_xsmax
{% elif who == 'parents' %}
notify.ios_parents
{% elif who == 'family' %}
notify.ios_family
{% else %}
notify.ios_family
{% endif %}
data:
message: "{{ value1 }} {{ value2 }} {{ value3 }}"
title: "{{ title|default('', true) }}"
data:
actions:
- title: "{{ title1|default('', true) }}"
action: "{{ action1 }}"
icon: "{{ icon1|default ('sfsymbols:house.circle', true) }}"
destructive: "{{ destructive1|default('false', true) }}"
- title: "{{ title2|default('', true) }}"
action: "{{ action2 }}"
icon: "{{ icon2|default ('sfsymbols:house.circle', true) }}"
destructive: "{{ destructive2|default('false', true) }}"
apns_id: "{{ apns_id }}"