mirror of
https://github.com/home-assistant/supervisor.git
synced 2026-10-01 09:19:58 +01:00
Report unsupported Wi-Fi auth methods (WPA3/sae, wpa-eap, owe, ...) instead of hiding the interface's state/config entirely. _map_nm_wifi() used to return None for these, blanking out both state.wifi and config.wifi even while genuinely connected. Adds AuthMethod.UNSUPPORTED, reported on GET but rejected on write; get_connection_from_interface() now leaves the existing 802-11-wireless-security section untouched for it instead of clearing it as if it were open auth; update_config() allows omitting wifi entirely for such an interface, since its config can't be safely echoed back or overwritten. Require psk when creating or switching to a new wpa-psk profile, since GET never returns the actual secret (only psk_set). A psk-less wpa-psk request used to pass schema validation, get persisted, and only fail asynchronously at activation with NO_SECRETS. Omitting psk remains valid when an existing wpa-psk profile is kept unchanged. Raised as a new translatable HostNetworkWifiPskRequiredError. Broaden the exception handling in find_connection_settings() to also catch DBusInterfaceError/DBusObjectError, not just DBusError. A profile can vanish between list_connections() and connect() (e.g. another client deleting it), surfacing as UnknownObject/UnknownMethod, neither of which derives from DBusError. Adds regression tests for all three, each confirmed to fail without its corresponding fix. Addresses review feedback on #7192.