mirror of
https://github.com/home-assistant/supervisor.git
synced 2026-05-08 08:58:31 +01:00
6877a8b210dac83994d015470d3de2bcca823e13
* Add D-Bus tolerant enum base classes to prevent crashes on unknown values D-Bus services (systemd, NetworkManager, RAUC, UDisks2) can introduce new enum values at any time via OS updates. Standard Python enum construction raises ValueError for unknown values, which would crash the Supervisor. Introduce DBusStrEnum and DBusIntEnum base classes that use Python's _missing_ hook to create pseudo-members for unknown values. These pseudo-members pass isinstance checks (satisfying typeguard), preserve the original value, don't pollute __members__, and report unknown values to Sentry (deduplicated per class+value) for observability. Migrate 17 D-Bus enums in dbus/const.py and udisks2/const.py to the new base classes. Enums only sent TO D-Bus (StopUnitMode, StartUnitMode, etc.) are left unchanged. Remove the manual try/except workaround in NetworkInterface.type now that DBusIntEnum handles it automatically. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add explicit enum conversions for systemd-resolved D-Bus properties The resolved properties (dns_over_tls, dns_stub_listener, dnssec, llmnr, multicast_dns, resolv_conf_mode) were returning raw string values from D-Bus without converting to their declared enum types. This would fail runtime type checking with typeguard. Now safe to add explicit conversions since these enums use DBusStrEnum, which tolerates unknown values from D-Bus without crashing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Avoid blocking I/O in D-Bus enum Sentry reporting Move sentry_sdk.capture_message out of the event loop by adding a fire_and_forget_capture_message helper that offloads the call to the executor when a running loop is detected. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Handle exceptions when reporting message to Sentry * Narrow typing of reported values Use str/int explicitly since that is what the two existing Enum classes can actually report. * Adjust test style * Apply suggestions from code review --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Home Assistant Supervisor
First private cloud solution for home automation
Home Assistant (former Hass.io) is a container-based system for managing your Home Assistant Core installation and related applications. The system is controlled via Home Assistant which communicates with the Supervisor. The Supervisor provides an API to manage the installation. This includes changing network settings or installing and updating software.
Installation
Installation instructions can be found at https://home-assistant.io/getting-started.
Development
For small changes and bugfixes you can just follow this, but for significant changes open a RFC first. Development instructions can be found here.
Release
Releases are done in 3 stages (channels) with this structure:
- Pull requests are merged to the
mainbranch. - A new build is pushed to the
devstage. - Releases are published.
- A new build is pushed to the
betastage. - The
stable.jsonfile is updated. - The build that was pushed to
betawill now be pushed tostable.
Description
Languages
Python
95.6%
JavaScript
4.3%
