34 lines
1.2 KiB
YAML
34 lines
1.2 KiB
YAML
# # Integration Health Monitor Package
|
|
|
|
# automation:
|
|
# # ----------------------------------------------------------
|
|
# # Kasa-Specific Recovery Attempt
|
|
# # ----------------------------------------------------------
|
|
# - id: integration_health_kasa_recovery
|
|
# alias: "🔄 Attempt Kasa Integration Reload on Failure"
|
|
# description: "Automatically attempts to reload Kasa integration after errors"
|
|
# mode: single
|
|
# trigger:
|
|
# - platform: event
|
|
# event_type: system_log_event
|
|
# event_data:
|
|
# level: ERROR
|
|
# condition:
|
|
# - condition: template
|
|
# value_template: >
|
|
# {{ 'kasa' in (trigger.event.data.name | default('') | lower)
|
|
# and '403' in (trigger.event.data.message | default('')) }}
|
|
# action:
|
|
# - delay:
|
|
# minutes: 2
|
|
# - service: persistent_notification.create
|
|
# data:
|
|
# title: "🔄 Attempting Kasa Recovery"
|
|
# message: "Detected Kasa authentication errors. Attempting integration reload..."
|
|
# notification_id: "kasa_recovery"
|
|
# - service: homeassistant.reload_config_entry
|
|
# target:
|
|
# entity_id: switch.studio_plug_1_2
|
|
# - delay:
|
|
# hours: 1
|