Skip to content

Commit

Permalink
fix garage automation
Browse files Browse the repository at this point in the history
  • Loading branch information
marcocunha committed Apr 4, 2024
1 parent 75b5f66 commit 713a4ea
Showing 1 changed file with 38 additions and 37 deletions.
75 changes: 38 additions & 37 deletions homeassistant/config/scripts/garage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,42 +9,43 @@ garage:
{% endif %}
sequence:
- parallel:
- if:
- condition: not
conditions:
- condition: state
entity_id: group.household
state: home
alias: Check if no-one at home
then:
- alias: Make an announcement on speakers and send notification
service: script.announcement
data:
speak: true
notify: true
messages:
- "{{ message }}"
service: notify.all
force_speak: false
else:
- alias: Make an announcement on speakers
service: script.announcement
data:
speak: true
notify: false
messages:
- "{{ message }}"
service: notify.all
force_speak: false
- alias: Toggle garage button
service: remote.send_command
data:
device: Garage
command: toggle
num_repeats: 1
delay_secs: 0.4
hold_secs: 0
target:
entity_id: remote.broadlink_rm4_pro
- alias: Toggle garage button
service: remote.send_command
data:
device: Garage
command: toggle
num_repeats: 1
delay_secs: 0.4
hold_secs: 0
target:
entity_id: remote.broadlink_rm4_pro
- if:
- condition: not
conditions:
- condition: state
entity_id: group.household
state: home
alias: Check if no-one at home
then:
- alias: Make an announcement on speakers and send notification
service: script.announcement
data:
speak: true
notify: true
messages:
- "{{ message }}"
service: notify.all
force_speak: false
else:
- alias: Make an announcement on speakers
service: script.announcement
data:
speak: true
notify: false
messages:
- "{{ message }}"
service: notify.all
force_speak: false

icon: mdi:garage-open-variant
mode: single

0 comments on commit 713a4ea

Please sign in to comment.