Skip to content

Commit

Permalink
update red alert automations
Browse files Browse the repository at this point in the history
  • Loading branch information
dmatik committed Nov 6, 2023
1 parent c7d02a5 commit a5058b0
Show file tree
Hide file tree
Showing 2 changed files with 326 additions and 1 deletion.
266 changes: 265 additions & 1 deletion homeassistant/config/automations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@
to: 'off'
for:
hours: 0
minutes: 5
minutes: 10
seconds: 0
from: 'on'
condition: []
Expand Down Expand Up @@ -924,3 +924,267 @@
no_motion_wait: 10
light_target:
entity_id: light.kitchen_led_strip
- id: '1699248159943'
alias: Red Alert Shtulim
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.redalert_shtulim
to: 'on'
condition: []
action:
- service: notify.mobile_app_iphonedima
data:
title: '{{ state_attr("sensor.redalert", "current")["title"] }}'
message: '{% if state_attr("sensor.redalert", "current")["desc"] != "" -%}
{{state_attr("sensor.redalert", "current")["desc"]}}
{%- endif %}
שתולים
'
data:
tag: redalert-shtulim
- service: notify.mobile_app_galitphone
data:
title: '{{ state_attr("sensor.redalert", "current")["title"] }}'
message: '{% if state_attr("sensor.redalert", "current")["desc"] != "" -%}
{{state_attr("sensor.redalert", "current")["desc"]}}
{%- endif %}
שתולים
'
data:
tag: redalert-shtulim
enabled: true
mode: single
- id: '1699248227759'
alias: Red Alert Shtulim Clear
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.redalert_shtulim
to: 'off'
for:
hours: 0
minutes: 10
seconds: 0
from: 'on'
condition: []
action:
- service: notify.mobile_app_iphonedima
data:
message: clear_notification
data:
tag: redalert-shtulim
- service: notify.mobile_app_galitphone
data:
message: clear_notification
data:
tag: redalert-shtulim
mode: single
- id: '1699248446778'
alias: Red Alert Hatsor
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.redalert_hatsor
to: 'on'
condition: []
action:
- service: notify.mobile_app_iphonedima
data:
title: '{{ state_attr("sensor.redalert", "current")["title"] }}'
message: '{% if state_attr("sensor.redalert", "current")["desc"] != "" -%}
{{state_attr("sensor.redalert", "current")["desc"]}}
{%- endif %}
חצור
'
data:
tag: redalert-hatsor
- service: notify.mobile_app_galitphone
data:
title: '{{ state_attr("sensor.redalert", "current")["title"] }}'
message: '{% if state_attr("sensor.redalert", "current")["desc"] != "" -%}
{{state_attr("sensor.redalert", "current")["desc"]}}
{%- endif %}
חצור
'
data:
tag: redalert-hatsor
enabled: true
mode: single
- id: '1699248492044'
alias: Red Alert Hatsor Clear
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.redalert_hatsor
to: 'off'
for:
hours: 0
minutes: 10
seconds: 0
from: 'on'
condition: []
action:
- service: notify.mobile_app_iphonedima
data:
message: clear_notification
data:
tag: redalert-hatsor
- service: notify.mobile_app_galitphone
data:
message: clear_notification
data:
tag: redalert-hatsor
mode: single
- id: '1699248553557'
alias: Red Alert Bitsron
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.redalert_bitsron
to: 'on'
condition: []
action:
- service: notify.mobile_app_iphonedima
data:
title: '{{ state_attr("sensor.redalert", "current")["title"] }}'
message: '{% if state_attr("sensor.redalert", "current")["desc"] != "" -%}
{{state_attr("sensor.redalert", "current")["desc"]}}
{%- endif %}
ביצרון
'
data:
tag: redalert-bitsron
- service: notify.mobile_app_galitphone
data:
title: '{{ state_attr("sensor.redalert", "current")["title"] }}'
message: '{% if state_attr("sensor.redalert", "current")["desc"] != "" -%}
{{state_attr("sensor.redalert", "current")["desc"]}}
{%- endif %}
ביצרון
'
data:
tag: redalert-bitsron
enabled: true
mode: single
- id: '1699248594979'
alias: Red Alert Bitsron Clear
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.redalert_bitsron
to: 'off'
for:
hours: 0
minutes: 10
seconds: 0
from: 'on'
condition: []
action:
- service: notify.mobile_app_iphonedima
data:
message: clear_notification
data:
tag: redalert-bitsron
- service: notify.mobile_app_galitphone
data:
message: clear_notification
data:
tag: redalert-bitsron
mode: single
- id: '1699248658108'
alias: Red Alert Ashdod
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.redalert_ashdod
to: 'on'
condition: []
action:
- service: notify.mobile_app_iphonedima
data:
title: '{{ state_attr("sensor.redalert", "current")["title"] }}'
message: '{% if state_attr("sensor.redalert", "current")["desc"] != "" -%}
{{state_attr("sensor.redalert", "current")["desc"]}}
{%- endif %}
אשדוד
'
data:
tag: redalert-ashdod
- service: notify.mobile_app_galitphone
data:
title: '{{ state_attr("sensor.redalert", "current")["title"] }}'
message: '{% if state_attr("sensor.redalert", "current")["desc"] != "" -%}
{{state_attr("sensor.redalert", "current")["desc"]}}
{%- endif %}
אשדוד
'
data:
tag: redalert-ashdod
enabled: true
mode: single
- id: '1699248701741'
alias: Red Alert Ashdod Clear
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.redalert_ashdod
to: 'off'
for:
hours: 0
minutes: 10
seconds: 0
from: 'on'
condition: []
action:
- service: notify.mobile_app_iphonedima
data:
message: clear_notification
data:
tag: redalert-ashdod
- service: notify.mobile_app_galitphone
data:
message: clear_notification
data:
tag: redalert-ashdod
mode: single
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,67 @@ binary_sensor:
'גן יבנה' in state_attr('sensor.redalert', 'current')['data'] }}
############################################################################
# #
# Redalert Bitsron #
# #
############################################################################

redalert_bitsron:
friendly_name: "Redalert Bitsron"
value_template: >-
{{ state_attr('sensor.redalert', 'alert') == true and
'ביצרון' in state_attr('sensor.redalert', 'current')['data'] }}
############################################################################
# #
# Redalert Shtulim #
# #
############################################################################

redalert_shtulim:
friendly_name: "Redalert Shtulim"
value_template: >-
{{ state_attr('sensor.redalert', 'alert') == true and
'שתולים' in state_attr('sensor.redalert', 'current')['data'] }}
############################################################################
# #
# Redalert Hatsor #
# #
############################################################################

redalert_hatsor:
friendly_name: "Redalert Hatsor"
value_template: >-
{{ state_attr('sensor.redalert', 'alert') == true and
'חצור' in state_attr('sensor.redalert', 'current')['data'] }}
############################################################################
# #
# Redalert Ashdod #
# #
############################################################################

redalert_ashdod:
friendly_name: "Redalert Ashdod"
value_template: >-
{{ state_attr('sensor.redalert', 'alert') == true and
('אשדוד - א,ב,ד,ה' in state_attr('sensor.redalert', 'current')['data'] or
'אשדוד - איזור תעשייה צפוני' in state_attr('sensor.redalert', 'current')['data'] or
'אשדוד - ג,ו,ז' in state_attr('sensor.redalert', 'current')['data'] or
'אשדוד - ח,ט,י,יג,יד,טז' in state_attr('sensor.redalert', 'current')['data'] or
'אשדוד -יא,יב,טו,יז,מרינה,סיט' in state_attr('sensor.redalert', 'current')['data'] ) }}
############################################################################
# #
# Redalert Test #
Expand Down

0 comments on commit a5058b0

Please sign in to comment.