fire alert
This commit is contained in:
parent
d8f22d9e03
commit
cebaad7b4b
|
|
@ -4,29 +4,33 @@ id: 8ce59ed4-f7dd-47a5-a1ab-ada15310fc2d
|
|||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.rauchmelder_buro_christian_smoke_detected
|
||||
entity_id:
|
||||
- binary_sensor.rauchmelder_buro_christian_smoke_detected
|
||||
- binary_sensor.rauchmelder_buro_christian_smoke_alarm_test
|
||||
- binary_sensor.feueralarm_dummy
|
||||
to:
|
||||
- 'off'
|
||||
- 'on'
|
||||
|
||||
- platform: state
|
||||
entity_id: binary_sensor.rauchmelder_buro_christian_smoke_alarm_test
|
||||
to:
|
||||
- 'off'
|
||||
- 'on'
|
||||
|
||||
action:
|
||||
# - variables:
|
||||
# trigger_data: "{{ trigger.to_state.state }}"
|
||||
- service: notify.dev_telegram
|
||||
- variables:
|
||||
param_entity: "{{trigger.to_state.entity_id}}"
|
||||
param_test_alert: "{{states('binary_sensor.group_smoke_sensors_test_alert')}}"
|
||||
- service: system_log.write
|
||||
data:
|
||||
message: >
|
||||
rauchmelder_buro_christian_smoke_detected changed
|
||||
{{ trigger.entity_id }}
|
||||
from {{ trigger.from_state.state }} to {{ trigger.to_state.state }}
|
||||
starting "smoke_sensor_script"...
|
||||
level: info
|
||||
message: "Automation Feuer erkannt!! | Entity: {{param_entity}} | Test-Alert: {{param_test_alert}} Starte Skript für Feueralarm..."
|
||||
# - service: notify.dev_telegram
|
||||
# data:
|
||||
# message: >
|
||||
# rauchmelder_buro_christian_smoke_detected changed
|
||||
# {{ trigger.entity_id }}
|
||||
# from {{ trigger.from_state.state }} to {{ trigger.to_state.state }}
|
||||
# starting "smoke_sensor_script"...
|
||||
- service: script.smoke_sensor_script
|
||||
data:
|
||||
trigger_param_state: "{{ trigger.to_state.state }}"
|
||||
trigger_param_entity_id: "{{trigger.entity_id}}"
|
||||
trigger_param: trigger.to_state
|
||||
param_state: "{{trigger.to_state.state}}"
|
||||
param_entity_id: "{{param_entity}}"
|
||||
param_test_alert: "{{param_test_alert}}"
|
||||
|
||||
mode: single
|
||||
|
|
@ -12,8 +12,12 @@ tts:
|
|||
- platform: google_translate
|
||||
|
||||
|
||||
ios: # https://www.justiot.de/smart-home/anleitung-push-nachrichten-mit-home-assistant-unter-ios/
|
||||
|
||||
logger:
|
||||
logger: # https://www.home-assistant.io/integrations/logger/
|
||||
default: info
|
||||
logs:
|
||||
waste_collection_schedule: debug
|
||||
waste_collection_schedule: debug
|
||||
homeassistant.components.script: debug
|
||||
homeassistant.components.automation: debug
|
||||
pyfritzhome.fritzhome: warning
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
# https://companion.home-assistant.io/docs/notifications/notifications-basic/
|
||||
name: iPhones
|
||||
platform: group
|
||||
services:
|
||||
- service: mobile_app_christians_iphone_14
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
# https://www.home-assistant.io/integrations/notify/
|
||||
#
|
||||
# https://companion.home-assistant.io/docs/notifications/notifications-basic/
|
||||
notify: !include_dir_list ../entities/notifiers
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
# The script integration allows users to specify a sequence of actions to be
|
||||
# executed by Home Assistant when turned on.
|
||||
#
|
||||
# This loads up my custom tempates.
|
||||
#
|
||||
# https://www.home-assistant.io/integrations/template/
|
||||
#
|
||||
|
||||
template: !include ../templates.yaml
|
||||
template split: !include_dir_named ../templates
|
||||
|
|
@ -1,16 +1,38 @@
|
|||
description: "Racumelder Ereignisse bearbeiten"
|
||||
fields: # https://www.home-assistant.io/integrations/script/#passing-variables-to-scripts
|
||||
trigger_param_entity_id: # https://www.home-assistant.io/integrations/script/#fields
|
||||
description: "entity_id des meldenden Gerätes"
|
||||
example: "binary_sensor.rauchmelder_buro_christian_smoke_detected"
|
||||
required: "true"
|
||||
trigger_param_state:
|
||||
description: "Status des Ereignisses"
|
||||
example: "on"
|
||||
required: "true"
|
||||
default: "off"
|
||||
param_entity_id: # https://www.home-assistant.io/integrations/script/#fields
|
||||
description: "entity_id des meldenden Gerätes"
|
||||
example: "binary_sensor.rauchmelder_buro_christian_smoke_detected"
|
||||
required: "true"
|
||||
param_test_alert:
|
||||
description: "probealarm ja/nein"
|
||||
required: "true"
|
||||
param_state:
|
||||
description: "Status des Ereignisses"
|
||||
example: "on"
|
||||
required: "true"
|
||||
default: "off"
|
||||
sequence:
|
||||
- service: system_log.write
|
||||
data:
|
||||
level: info
|
||||
message: "Skript Feueralarm für Entity '{{param_entity_id}}' gestartet. (State: {{param_state}}) | Probealarm: {{param_test_alert}} Starte Aktionen..."
|
||||
|
||||
# send critical notifications https://companion.home-assistant.io/docs/notifications/critical-notifications
|
||||
- service: notify.iPHONES
|
||||
data:
|
||||
title: "FEUERALARM"
|
||||
message: "Feueralarm für '{{param_entity_id}}'"
|
||||
data:
|
||||
push:
|
||||
sound:
|
||||
name: "default"
|
||||
critical: 1
|
||||
volume: 1.0
|
||||
|
||||
- service: notify.dev_telegram
|
||||
data:
|
||||
message: >
|
||||
todo: {{ trigger_param_state }}, {{ trigger_param_entity_id }}
|
||||
Feueralarm für Entity '{{param_entity_id}}'!!! (State: {{param_state}}) | Probealarm: {{param_test_alert}}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
- sensor:
|
||||
|
||||
- binary_sensor:
|
||||
# simuliert einen nicht Hardware-Rouchmelder, der einfach über dem Dummy-Schalter aktiviert werden kann
|
||||
- name: Feueralarm_Dummy
|
||||
state: >
|
||||
{% if states("input_boolean.switch_fire_alert_dummy")|lower == "on" %}
|
||||
On
|
||||
{% else %}
|
||||
Off
|
||||
{% endif %}
|
||||
Loading…
Reference in New Issue