From 65802b6f72668bd70175699f1bfcba68c2074fdd Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 8 Oct 2026 14:40:03 +0000 Subject: [PATCH] Fix the mFRR automation example in the README The example's code block was never closed, so the rest of the README rendered as code. Its state trigger also fired when the event entity became unavailable (failing on the missing start attribute) and again when the restored state came back after a restart or reload. Adding not_from/not_to: unavailable leaves one notification per activation, checked with an automation in Home Assistant 2026.10.0. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01UwYSvzP667Y5pkhzfs8obW --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 87dcdb9..a78e6cb 100644 --- a/README.md +++ b/README.md @@ -100,6 +100,10 @@ automation: triggers: - trigger: state entity_id: event.min_anlaggning_mfrr_activation # anläggningens namn + mfrr_activation; kontrollera under din CheckWatt-enhet + # Utan dessa utlöses automationen även när HA startar om eller + # integrationen laddas om, och när entiteten blir otillgänglig. + not_from: unavailable + not_to: unavailable actions: - action: notify.notify data: @@ -107,6 +111,7 @@ automation: mFRR {{ trigger.to_state.attributes.event_type }}: {{ trigger.to_state.attributes.power_w }} W från {{ as_local(as_datetime(trigger.to_state.attributes.start)).strftime('%H:%M') }} +``` ### Autentisering