Repository navigation
2.3.4 follow-ups: alert names, monitoring refusals, legacy monitoring option - #389
Merged
Merged
Conversation
… refuse an unloaded panel
Current monitoring notifications name a circuit by its Home Assistant name,
{name} in custom templates included, and the span_panel_current_alert event
gains alert_display_name while alert_name stays as it was. {entity_id} carries
the circuit's Current sensor, else its Power sensor, or the mains leg's.
Every monitoring service now finds its panel through one path: a config entry
that is not a SPAN Panel's is refused as monitoring_panel_unknown, an unloaded
panel as monitoring_panel_not_loaded, and monitoring_not_enabled is left for a
loaded panel with monitoring off. Get monitoring status no longer answers "off"
for an unloaded panel, and turning monitoring off on one no longer reports
success while doing nothing.
The legacy enable_current_monitoring option is moved into the monitoring store
once at setup and removed from the entry, so monitoring turned off stays off
across a restart.
The release build of span-card v0.12.1-beta.3 (8151fac), which handles the monitoring_panel_not_loaded refusal; span-panel-card.js is byte-identical to the release asset.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Follow-ups for 2.3.4: current-monitoring alert names, monitoring services that refuse a panel that isn't loaded, and the legacy monitoring option. This PR also bundles span-card v0.12.1-beta.3 (SpanPanel/span-card#48), which handles the new refusal. The bundled
span-panel-card.jsis byte-identical to that release's asset.Changes
{name}in custom templates included. A shared meter joins its members' names with " + ". Thespan_panel_current_alertevent gainsalert_display_name, andalert_nameis unchanged.{entity_id}carries the circuit's Current sensor, else its Power sensor, or the mains leg's Current sensor. No event field changes otherwise.monitoring_panel_unknown;monitoring_panel_not_loaded;monitoring_not_enabledis left for a loaded panel with monitoring off.The package-ratings services follow the same path, under AGENTS.md rule 8.
enable_current_monitoringis moved into the monitoring store once at setup and removed from the entry, so monitoring turned off stays off across a restart.Changelog (2.3.4, Fixed)
{name}in a custom title or message, where they used its name in the SPAN app; thespan_panel_current_alertevent carries that name in a newalert_display_namefield and leavesalert_nameas it was.{entity_id}placeholder in a current monitoring notification's title or message now carries the entity ID of the circuit's Current sensor, or its Power sensor where it has none, or of the mains leg's Current sensor, where it carried the circuit's internal id or the leg's name.Tests
tests/test_alert_display_names.py, plus refusal, write-path and legacy-option tests. Each fails on the previous code or under the review's mutations.