Added Small garage door back in #1138

This commit is contained in:
CCOSTAN 2024-05-03 21:13:52 +00:00
parent 957b74b126
commit 808f0dc5f1
2 changed files with 45 additions and 41 deletions

View File

@ -1 +1 @@
2024.4.3 2024.4.4

View File

@ -6,21 +6,9 @@
# Switch to Access_Tokens - https://www.vcloudinfo.com/2020/05/fixing-garadget-in-home-assistant.html # Switch to Access_Tokens - https://www.vcloudinfo.com/2020/05/fixing-garadget-in-home-assistant.html
#------------------------------------------- #-------------------------------------------
# cover: cover:
# - platform: mqtt - platform: mqtt
# name: "Small Garage Door"
# device_class: 'garage'
# command_topic: "garadget/GSmall/command"
# state_topic: "garadget/GSmall/status"
# value_template: >-
# {% if value_json.status == 'closed' %}
# closed
# {% else %}
# open
# {% endif %}
# payload_open: "open"
# payload_close: "close"
# payload_stop: "stop"
mqtt: mqtt:
cover: cover:
@ -38,6 +26,20 @@ mqtt:
payload_close: "close" payload_close: "close"
payload_stop: "stop" payload_stop: "stop"
- name: "Small Garage Door"
device_class: 'garage'
command_topic: "garadget/GSmall/command"
state_topic: "garadget/GSmall/status"
value_template: >-
{% if value_json.status == 'closed' %}
closed
{% else %}
open
{% endif %}
payload_open: "open"
payload_close: "close"
payload_stop: "stop"
sensor: sensor:
- name: "Large Garage Door Since" - name: "Large Garage Door Since"
state_topic: "garadget/GLarge/status" state_topic: "garadget/GLarge/status"
@ -48,24 +50,21 @@ mqtt:
unit_of_measurement: '%' unit_of_measurement: '%'
value_template: '{{ value_json.bright }}' value_template: '{{ value_json.bright }}'
- name: "Small Garage Door Since"
state_topic: "garadget/GSmall/status"
value_template: '{{ value_json.time }}'
# - platform: mqtt - name: "Small Garage Door Brightness"
# name: "Small Garage Door Since" state_topic: "garadget/GSmall/status"
# state_topic: "garadget/GSmall/status" unit_of_measurement: '%'
# value_template: '{{ value_json.time }}' value_template: '{{ value_json.bright }}'
# - platform: mqtt
# name: "Small Garage Door Brightness"
# state_topic: "garadget/GSmall/status"
# unit_of_measurement: '%'
# value_template: '{{ value_json.bright }}'
group: group:
garage_doors: # This group is used to check if doors are open or Closed. garage_doors: # This group is used to check if doors are open or Closed.
name: Garage Doors name: Garage Doors
entities: entities:
- cover.large_garage_door - cover.large_garage_door
# - cover.small_garage_door - cover.small_garage_door
###################################################################### ######################################################################
## Send a notification to anyone coming home asking if they want to open the garage door. ## Send a notification to anyone coming home asking if they want to open the garage door.
@ -87,8 +86,13 @@ automation:
entity_id: cover.large_garage_door entity_id: cover.large_garage_door
state: 'closed' state: 'closed'
action: action:
- variables: # - variables:
person_triggered: "{{ trigger.to_state.entity_id.split('.')[1] }}" # person_triggered: "{{ trigger.to_state.entity_id.split('.')[1] }}"
- service: input_text.set_value
target:
entity_id: input_text.last_person_home
data:
value: "{{ trigger.to_state.entity_id.split('.')[1] }}"
- service: script.notify_engine_two_button - service: script.notify_engine_two_button
data: data:
title: 'Welcome Home!' title: 'Welcome Home!'
@ -101,7 +105,7 @@ automation:
action2: 'NO_OPEN_LARGE_GARAGE' action2: 'NO_OPEN_LARGE_GARAGE'
icon2: 'sfsymbols:house.circle' icon2: 'sfsymbols:house.circle'
destructive2: 'true' destructive2: 'true'
who: "{{ person_triggered }}" who: "{{ states('input_text.last_person_home') }}"
group: 'Welcome_Home' group: 'Welcome_Home'
- alias: 'Open Large Garage Door Action' - alias: 'Open Large Garage Door Action'
@ -111,7 +115,7 @@ automation:
event_type: mobile_app_notification_action event_type: mobile_app_notification_action
event_data: event_data:
action: OPEN_LARGE_GARAGE action: OPEN_LARGE_GARAGE
conditions: condition:
- condition: state - condition: state
entity_id: cover.large_garage_door entity_id: cover.large_garage_door
state: 'closed' state: 'closed'
@ -128,8 +132,8 @@ automation:
platform: event platform: event
event_type: mobile_app_notification_action event_type: mobile_app_notification_action
event_data: event_data:
action: 'NO_OPEN_LARGE_GARAGE' action: NO_OPEN_LARGE_GARAGE
conditions: condition:
- condition: state - condition: state
entity_id: group.family entity_id: group.family
state: 'home' state: 'home'
@ -146,7 +150,7 @@ automation:
action2: 'KEEP_FRONT_DOOR_LOCKED' action2: 'KEEP_FRONT_DOOR_LOCKED'
icon2: 'sfsymbols:lock' icon2: 'sfsymbols:lock'
destructive2: 'true' destructive2: 'true'
who: "{{ person_triggered }}" who: "{{ states('input_text.last_person_home') }}"
group: 'Welcome_Home' group: 'Welcome_Home'
- alias: 'Unlock Front Door Action' - alias: 'Unlock Front Door Action'
@ -155,7 +159,7 @@ automation:
platform: event platform: event
event_type: mobile_app_notification_action event_type: mobile_app_notification_action
event_data: event_data:
action: 'UNLOCK_FRONT_DOOR' action: UNLOCK_FRONT_DOOR
action: action:
- service: lock.unlock - service: lock.unlock
entity_id: lock.front_door entity_id: lock.front_door
@ -171,10 +175,10 @@ automation:
- platform: time_pattern - platform: time_pattern
minutes: '/1' minutes: '/1'
action: action:
# - service: mqtt.publish - service: mqtt.publish
# data: data:
# topic: "garadget/GSmall/command" topic: "garadget/GSmall/command"
# payload: "get-status" payload: "get-status"
- service: mqtt.publish - service: mqtt.publish
data: data:
@ -188,7 +192,7 @@ automation:
- platform: state - platform: state
entity_id: entity_id:
- cover.large_garage_door - cover.large_garage_door
# - cover.small_garage_door - cover.small_garage_door
from: 'open' from: 'open'
to: 'closed' to: 'closed'
for: '00:02:00' for: '00:02:00'
@ -196,7 +200,7 @@ automation:
- platform: state - platform: state
entity_id: entity_id:
- cover.large_garage_door - cover.large_garage_door
# - cover.small_garage_door - cover.small_garage_door
from: 'closed' from: 'closed'
to: 'open' to: 'open'
for: '00:02:30' for: '00:02:30'