Skip to content

Commit

Permalink
Update automation_hass_alert_notification.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
jazzyisj committed Aug 13, 2023
1 parent 584d52e commit 00c39f8
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions automations/hass/automation_hass_alert_notification.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,42 +10,26 @@
sensor: "sensor.{{ trigger.entity_id.split('.')[1] }}"
trigger:
- platform: state
id: hass
entity_id:
- sensor.available_updates
- sensor.offline_integrations
- sensor.unavailable_entities_filtered
- sensor.unavailable_media_players
- sensor.unknown_browsers
- sensor.unknown_devices
attribute: entity_id
to: ~
for: 60 # throttle alerts, ignore momentary changes

# must trigger when alert turns on/off
- platform: state
id: hass
entity_id:
- alert.available_updates
- alert.offline_integrations
- alert.unavailable_entities
- alert.unavailable_media_players
- alert.unknown_browsers
to: ~

- platform: state
id: network
entity_id:
- sensor.unknown_devices
attribute: entity_id
to: ~
for: 60 # throttle alerts, ignore momentary changes

# must trigger when alert turns on, attribute trigger missed if delay_on
- platform: state
id: network
entity_id:
- alert.unknown_devices
to: ~
condition: "{{ is_state('input_boolean.' ~ state_attr('alert.' ~ tag,'category') ~ '_alerts','on') }}"
action:
- wait_template: "{{ is_state('input_boolean.startup_pending','off') }}"
Expand Down

0 comments on commit 00c39f8

Please sign in to comment.