Skip to content

Fix the mFRR automation example in the README - #13

Merged
andreasthell merged 1 commit into
mainfrom
claude/quirky-gates-vo0djf
Oct 8, 2026
Merged

andreasthell merged 1 commit into
mainfrom
claude/quirky-gates-vo0djf

Conversation

@andreasthell

Copy link
Copy Markdown
Owner

Follow-up to #11.

  • Unclosed code block: the example's YAML block was never closed, so everything after it in the README rendered as code.

  • Extra notifications and errors: the example's state trigger also fired in two cases where it should not:

    • when the event entity became unavailable, where the template failed with 'ReadOnlyDict object' has no attribute 'start'
    • when the restored state came back after a restart or reload, which sent a duplicate notification

    The trigger now has not_from: unavailable and not_to: unavailable.

I tested the example as a real automation in Home Assistant 2026.10.0 with one activation followed by an integration reload:

Trigger Notifications Template errors
plain state (before) 2 yes
not_from: unavailable 1 yes
not_from + not_to: unavailable (now) 1 none

The template itself (as_local(as_datetime(...start))) works both with the live datetime attribute and with the string it is restored as.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UwYSvzP667Y5pkhzfs8obW


Generated by Claude Code

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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UwYSvzP667Y5pkhzfs8obW
@andreasthell
andreasthell merged commit 93c9ead into main Oct 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants