Files
Home-Assistant/packages/integration_health_monitor.yaml
T

34 lines
1.2 KiB
YAML
Raw Normal View History

2026-06-28 14:27:20 -04:00
# Integration Health Monitor Package
automation:
# ----------------------------------------------------------
# Kasa-Specific Recovery Attempt
2026-06-28 14:27:20 -04:00
# ----------------------------------------------------------
- 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)
2026-06-28 14:27:20 -04:00
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