From 4f9c40579914d42526b8eddc217be7c219bb7f12 Mon Sep 17 00:00:00 2001 From: Jey Burrows <175012+jeyrb@users.noreply.github.com> Date: Wed, 25 Nov 2026 16:05:49 +0000 Subject: [PATCH] docs: entities page and common problems (quality scale Gold docs rules) A new Entities page lists the entities on each platform, what each does, and how they update (no polling), meeting docs-supported-functions and docs-data-update. Troubleshooting gains Common Problems, each with its symptom, cause and fix, for docs-troubleshooting. docs-examples was already met, as the rule accepts YAML automation examples. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 3 + .../supernotify/quality_scale.yaml | 32 ++++--- docs/help/troubleshooting.md | 85 +++++++++++++++++++ docs/usage/entities.md | 76 +++++++++++++++++ 4 files changed, 183 insertions(+), 13 deletions(-) create mode 100644 docs/usage/entities.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 83a096e52b..bdab8280a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ ## 🐛 Bug fixes - *Actions*: the `supernotify.*` actions, such as `supernotify.notify` and `supernotify.snooze`, are there from when Home Assistant starts, rather than only once Supernotify has loaded, so an automation using them no longer fails to validate while it starts, or if it failed to start. Until it has loaded, they say so with an error. Home Assistant's [action-setup](https://contributors.home-assistant.io/core/quality-scale/action-setup/) rule, needed for its Bronze quality level +## 📝 Other changes +- *Documentation*: a page on [Supernotify's entities](https://supernotify.rhizomatics.org.uk/latest/usage/entities/), what each does and when it updates, and [common problems](https://supernotify.rhizomatics.org.uk/latest/help/troubleshooting/#common-problems) on the Troubleshooting page, each with its cause and fix + # v2.19.1 ## ✨ Enhancements diff --git a/custom_components/supernotify/quality_scale.yaml b/custom_components/supernotify/quality_scale.yaml index f04d414005..e1bc9bf393 100644 --- a/custom_components/supernotify/quality_scale.yaml +++ b/custom_components/supernotify/quality_scale.yaml @@ -252,17 +252,20 @@ rules: comment: Not applicable - integration does not support discovery. docs-data-update: - status: todo + status: done comment: | - Need a doc section explaining that diagnostic entities (e.g. - sensor.notifier_whisper_attivo) update on notification/scenario events, - not on a poll interval. + docs/usage/entities.md "How Entities Update": nothing is polled, and no outside service is + called to update entities, so no rate limits apply. Scenario condition binary_sensors are + re-evaluated on state changes of their condition entities and on a timer set in + scenario_control; the counters change as notifications are sent; switches when switched. docs-examples: - status: todo + status: done comment: | - Rule wants automation blueprints. docs/recipes/ (24 markdown recipes) - covers similar ground informally but isn't in blueprint-exchange format. + The rule accepts YAML automation examples as well as blueprints. docs/recipes/ has YAML + examples for common uses, including complete automations (someone_at_the_door, + restart_email, dishwasher_live_activity, voice_described_cctv), and docs/usage/notifying.md + shows the actions in automations. docs-known-limitations: status: done @@ -275,16 +278,19 @@ rules: exempts this case. docs-supported-functions: - status: todo + status: done comment: | - Partially covered by docs/usage/actions.md and docs/transports/*, but not - organized as a single supported-functionality reference per the rule. + docs/usage/entities.md lists the entities on each platform (notify, switch, binary_sensor, + sensor, button) and what each does, alongside docs/usage/actions.md for the actions and + docs/transports/ for the transports. docs-troubleshooting: - status: todo + status: done comment: | - docs/help/troubleshooting.md lists the debugging tools (archive, diagnostics, debug mode, - enquire actions) but not common symptoms with their causes and fixes, which the rule asks for. + docs/help/troubleshooting.md "Common Problems" gives the symptom, cause and fix for the + problems users can solve themselves: notifications left out by a rule (by suppression + reason), actions when Supernotify isn't loaded, duplicate detection, email without a sender or with a missing attachment, + snapshot URLs, unrendered templates and unknown scenario binary_sensors. docs-use-cases: status: done diff --git a/docs/help/troubleshooting.md b/docs/help/troubleshooting.md index f6d4632f7a..4e81bff955 100644 --- a/docs/help/troubleshooting.md +++ b/docs/help/troubleshooting.md @@ -9,6 +9,91 @@ description: Tips, tricks and tools for debugging issues --- # Troubleshooting +## Common Problems + +### A notification doesn't arrive + +**Symptom**: the notification is sent, without an error, but nothing arrives, or it doesn't arrive by every delivery +expected. The log has a warning like `SUPERNOTIFY No deliveries made for ...`, followed by the reasons. + +**Cause**: a rule left it out, as configured. The reasons are: + +| Reason | Why | To fix | +|----------------------|------------------------------------------------------------------------------------|----------------------------------------------------------------------------| +| `SNOOZED` | The recipient, delivery or everything is snoozed | List snoozes with `supernotify.enquire_snoozes`, and end them with `supernotify.unsnooze` | +| `PRIORITY` | The notification's priority isn't one the delivery is for | Change the notification's `priority`, or the delivery's, see [Deliveries](../configuration/deliveries.md) | +| `OCCUPANCY` | The delivery is only for recipients at home, or only away | Check with `supernotify.enquire_occupancy`, see [Deliveries](../configuration/deliveries.md) | +| `DELIVERY_CONDITION` | The delivery's conditions don't hold | See [Conditions](../configuration/conditions.md) | +| `NO_SCENARIO` | The delivery is only for a scenario that doesn't apply | Check with `supernotify.enquire_active_scenarios`, see [Scenarios](../configuration/scenarios.md) | +| `TRANSPORT_DISABLED` | The transport is switched off | Switch it on, or press *Reset overrides*, see [Entities](../usage/entities.md) | +| `NO_TARGET` | The delivery has no one to send to | Give the recipients the addresses or devices it needs, see [People](../configuration/people.md) | + +`supernotify.enquire_last_notification` shows what happened to the last notification, and the +[Archive](../configuration/archiving.md) to every one. + +### An action says Supernotify isn't loaded + +**Symptom**: a `supernotify.*` action, such as `supernotify.notify`, fails with *Supernotify isn't loaded*. + +**Cause**: Supernotify is still starting, failed to start, or is disabled. If it failed, the log has +*Supernotify failed to start, and will retry*, with the reason, and it tries again by itself. + +**Fix**: check the reason in the log and on the integration's page, correct the configuration, and reload +the integration, or enable it if it's disabled. + +### The same notification is only sent once + +**Symptom**: a notification sent again soon after, with the same message and title, doesn't arrive. + +**Cause**: duplicate detection, which leaves out a repeat of a recent notification at the same or a lower priority. + +**Fix**: send it with `force_resend: true`, or change the policy, see [Duplicate Detection](../configuration/dupe_detection.md). + +### No emails are sent + +**Symptom**: nothing goes by email, and the log has a warning at startup that there is no sender. + +**Cause**: a direct SMTP email needs a sender address, as Home Assistant's own SMTP integration does. + +**Fix**: set `sender` in the email transport's `options`, or set up the SMTP integration from the UI, for +Supernotify to reuse, see [Email](../transports/email.md#configuring). + +### An image is missing from an email + +**Symptom**: the email arrives without its image, and the log has a warning that the attachment was skipped. + +**Cause**: only files in Supernotify's media path, or a folder Home Assistant allows files to be read from, are attached. + +**Fix**: save the image in the media path, `www`, a folder in `media_dirs` or one in `allowlist_external_dirs`, see +[Email](../transports/email.md#image-attachments). + +### A snapshot URL gives no image + +**Symptom**: a notification with a `snapshot_url` arrives without the image, and there may be a repair listing why. + +**Cause**: the URL didn't give an image, it was bigger than the *Largest Snapshot Download* setting, or, with +*Only Local Snapshot URLs* on, it isn't Home Assistant itself, on the same network, or in `allowlist_external_urls`. + +**Fix**: see [Snapshot URLs](../configuration/multimedia.md#snapshot-urls). + +### A template shows as text + +**Symptom**: a message has `{{ ... }}` in it, rather than what the template should give. + +**Cause**: the *Render Templates in Notify Calls* setting is off, as it is for new installs, so a template that +reaches Supernotify unrendered, such as from AppDaemon or a `{% raw %}` block, is left as it is. + +**Fix**: switch the setting on, or move the template into a scenario's `message_template`, see +[Automation and Templates](../usage/notifying.md#automation-and-templates). + +### A scenario's binary sensor is unknown + +**Symptom**: a *Scenario Condition* binary sensor stays *unknown*. + +**Cause**: `refresh` is off in `scenario_control`, so nothing keeps its state current, or the scenario has no conditions. + +**Fix**: switch on `refresh`, see [Entities](../usage/entities.md#how-entities-update) and [Scenarios](../configuration/scenarios.md). + ## Options - [AI Agents](./ai_help.md) can give very good help these days, even the free one built into [Google Search](./ai_help.md#google-and-ai-assisted-help). diff --git a/docs/usage/entities.md b/docs/usage/entities.md new file mode 100644 index 0000000000..94371056cd --- /dev/null +++ b/docs/usage/entities.md @@ -0,0 +1,76 @@ +--- +tags: + - entities + - scenario + - recipient + - delivery + - transport + - administration +description: The entities Supernotify adds to Home Assistant, what each does, and when they update +--- +# Entities + +Supernotify adds these entities to Home Assistant. Apart from the recipients' notify entities, they all +belong to a single *SuperNotify* device, on the integration's page. Supernotify is a service, not a +device integration, so the same entities are available whatever phones, speakers or other devices +notifications go to. + +## Notify + +| Entity | What it does | +|-------------------|--------------------------------------------------------------------------------------------------| +| Notify *recipient* | One for each recipient. Sending a message to it notifies that recipient, with all their usual deliveries, occupancy, scenarios, snoozes and duplicate checks applied. Only a message and title can be given, as for any notify entity; use the [`supernotify.notify`](actions.md) action for anything more | + +## Switches + +Each switch turns something on or off at runtime, overriding its `enabled` in the configuration. +The override is kept across a restart or reload, until the configured value itself changes. The +*Reset overrides* button puts them all back. All are configuration entities. + +| Entity | What it does | +|---------------------------------|------------------------------------------------------------------------------| +| Scenario *scenario* | Whether the scenario is enabled, and so able to apply to notifications | +| Recipient *recipient* Enabled | Whether the recipient is enabled, and so able to be notified | +| Delivery *delivery* Enabled | Whether the delivery is enabled, and so able to be used for notifications | +| *Transport* Enabled | Whether the transport is enabled. When off, none of its deliveries are used | + +## Binary Sensors + +All are diagnostic entities. + +| Entity | What it shows | +|---------------------------------|------------------------------------------------------------------------------| +| Scenario Condition *scenario* | Whether the scenario's conditions hold right now, evaluated at medium priority with the current occupancy. Read only: whether the scenario is enabled is its switch. It is *unknown* if `scenario_control` has `refresh` switched off, see [Scenarios](../configuration/scenarios.md) | +| Scenario Manual *scenario* | For a scenario with no conditions of its own. This one is the control: a script or automation sets it on or off, and the scenario applies while it's on. Kept across a restart | +| Recipient *recipient* | Whether the recipient is enabled. Deprecated, use the recipient's switch | +| Delivery *delivery* | Whether the delivery is enabled. Deprecated, use the delivery's switch, and disabled unless switched on | +| Transport *transport* | Whether the transport is enabled. Deprecated, use the transport's switch, and disabled unless switched on | + +## Sensors + +Both are diagnostic entities, counting up from when Supernotify was installed, and kept across a restart. + +| Entity | What it counts | +|------------------------|---------------------------------------------------------------------------------------------------------| +| Notifications sent | Notifications delivered by at least one delivery. A notification with `dry_run` isn't counted | +| Notification failures | Notifications that stopped with an unexpected error. A delivery failing, or a notification skipped by a rule such as a snooze, isn't counted, see [Troubleshooting](../help/troubleshooting.md) | + +## Button + +| Entity | What it does | +|------------------|-----------------------------------------------------------------------------------------------------------| +| Reset overrides | Puts every scenario, recipient, delivery and transport switched on or off at runtime back to its configured state, the same as the `supernotify.reset_overrides` action. A configuration entity | + +## How Entities Update + +Supernotify doesn't poll anything, and has no requests to an outside service to update its entities, so +no rate limits or quotas apply. Its entities change when something happens: + +- The **switches** change when switched, or when *Reset overrides* is pressed or the configuration changes +- The **Scenario Condition** binary sensors are evaluated again straight away when an entity in their conditions + changes state, and once a minute for conditions that depend on the time or date, or on something Home Assistant + can't track. Both are set in `scenario_control`, see [Scenarios](../configuration/scenarios.md) +- The **counters** change as each notification is sent +- **Recipient**, **delivery** and **transport** binary sensors change with their switches + +The `supernotify.refresh_entities` [action](actions.md) publishes the state of every entity again, if one ever looks out of date.