2026-06-28 14:27:20 -04:00
|
|
|
# Integration Health Monitor Package
|
|
|
|
|
|
|
|
|
|
automation:
|
|
|
|
|
# ----------------------------------------------------------
|
2026-08-30 19:53:50 -04:00
|
|
|
# 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: >
|
2026-08-30 19:53:50 -04:00
|
|
|
{{ '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
|