Major change to Supernotify to introduce standard Home Assistant UI installation and configuration, and a new supernotify configuration domain for advanced YAML config (deliveries, transports, scenarios etc)
ConfigFlow
- SuperNotify is now set up using the standard HomeAssistant UI ('ConfigFlow')
- This covers basic use cases using default deliveries, like mobile push and email
- More advanced configuration - like scenarios, cameras, transport, action configs etc - continues to require YAML configuration
- That YAML now lives under a top-level
supernotify:key, not the oldnotify: - platform: supernotifyblock - typically split out withsupernotify: !include supernotify.yaml - The config entry is now the sole, unconditional owner of the
notify.supernotifyaction - no more dual registration between YAML and the UI - A leftover
notify: - platform: supernotifyblock is inert (nothing is registered from it) but raises a fixable repair that automates the move: writessupernotify.yaml, adds the include line, reloads immediately - no restart needed. Migrating by hand instead works just as well; either way, deleting the old block afterwards is what makes the repair stop reappearing - A custom
name:from that old block (which determines the actualnotify.<name>action, e.g.name: SuperNotifier→notify.supernotifier) is kept in sync automatically on every load, independent of whether the repair has been run yet - existing installs don't lose their action name mid-upgrade - Core config (archive/dupe_check/housekeeping/paths/name) is reconfigurable via UI, and now actually applies immediately via an update listener - no reload/restart needed
Technical Changes
- Step 1 of the roadmap updated to minimize reuse of 'legacy' integration style, then extended further to retire that legacy style entirely for the notify-platform registration
- Details
config_flow.py— zero-required-field user step (reproducesminimal.yaml), options flow with archive/dupe_check/housekeeping pages, single_config_entry enforced, plus anamefield determining the registered action.__init__.py— CONFIG_SCHEMA/async_setup for the top-levelsupernotify:key;async_setup_entryunconditionally ownsnotify.supernotify, computing the service name fromentry.data[name]; an update listener reloads the entry so options/reconfigure changes apply immediately.notify.py—async_get_service(the legacynotify:platform entrypoint) reduced to a shim: raises the migration repair and syncsentry.data[name]from the legacy config on every load, but registers nothing itself.manifest.json—config_flow: true,single_config_entry: true, notify added to dependencies.strings.json+ all 11 translations/*.json — new fields, options pages, and the migration repair's fixable flow text.schema.py— split intoSUPERNOTIFY_YAML_SCHEMA(8 YAML-only keys),CONFIG_ENTRY_SCHEMA(8 ConfigEntry-owned keys),FULL_CONFIG_SCHEMA(single-pass union, for tests) -_entry_full_configvalidates entry.data/options throughCONFIG_ENTRY_SCHEMAand merges in the already-validated YAML section as-is, rather than re-validating a combined dict a second time (which would reject values a first pass already coerced, e.g.cv.template'sTemplateobjects).repairs.py(new) — thelegacy_yaml_configfixable repair: writessupernotify.yaml+ appends the include line, validated on the event loop before writing (cv.template's bare-Jinja-string condition shorthand needs the event-loop-boundhasscontext, so this can't happen from the executor thread the file I/O runs in), validates configuration.yaml as a whole before and after viaasync_check_ha_config_file, rolls back and logs the underlying error on any failure, raises a separate persistentlegacy_yaml_manual_migration_requiredissue when automation can't proceed, and serializes the whole write-and-reload sequence behind a lock so two concurrent attempts can't interleave.- Tests:
test_config_flow.py,test_init.py,test_repairs.py(new),test_config_yaml.py,test_example_configs.pyall updated/added for the new architecture. - Docs:
docs/configuration/yaml.md,email.mdanddocs/recipes/contextual_mobile_actions.mdupdated for the top-levelsupernotify:key;docgen/schema_extractor.pyupdated for the renamed schema. - Fix log errors from accessing version in
manifest.jsonand eager loading MQTT component
- Silver level HA Quality Level Checks
- Stage 2 of the roadmap partially implemented, 'Bronze' level only
- Better testing of user supplied values in config
- Additional services moved to shared yaml/ui config code
- Improved exception handling
- Template Path
- Directory now created if specified and doesn't exist
- Default is relative to config home rather than hard-coded to
/config - Better logging for path actions
- Async I/O
- Final 2
media_grab.pyPillow image I/O wrapped as async - SMTP attach file now uses
aiofiles
- Final 2
Full Changelog: v1.7.1...v2.0.0