From fa3a386cc484444d4868724eb106ef6d5e2a0198 Mon Sep 17 00:00:00 2001 From: Christian Manivong Date: Thu, 3 Dec 2026 08:31:36 +0100 Subject: [PATCH] fix: the driver names itself Home Assistant OS A driver picker shows TYPE_LABEL. OSDriver's "OS" left Home Assistant the only host driver there without a name of its own (Linux, Windows, FreeBSD say theirs). --- CHANGELOG.md | 1 + napalm_homeassistant/driver.py | 2 ++ tests/test_driver.py | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44ace06..5ef4b53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,3 +16,4 @@ All notable changes to this driver. The format follows add-on or switch its start at boot, refresh the update information, reboot and shut down the host. - Discovery: Home Assistant's web page on port 8123. +- Type label `Home Assistant OS`, so a driver picker names it. diff --git a/napalm_homeassistant/driver.py b/napalm_homeassistant/driver.py index ce89a4d..a56fe51 100644 --- a/napalm_homeassistant/driver.py +++ b/napalm_homeassistant/driver.py @@ -101,6 +101,8 @@ class HomeAssistantDriver(RunningBackupsMixin, OSDriver): VENDOR = VENDOR DRIVER_NAME = "homeassistant" + #: Its own name in a driver picker: "OS" alone does not say which. + TYPE_LABEL = "Home Assistant OS" USES_SSH = False #: Home Assistant OS boots and starts Core before the API answers again. REBOOT_SETTLE_SECONDS = 180 diff --git a/tests/test_driver.py b/tests/test_driver.py index 17b03c4..82f298b 100644 --- a/tests/test_driver.py +++ b/tests/test_driver.py @@ -28,7 +28,7 @@ def test_metadata() -> None: assert HomeAssistantDriver.DRIVER_NAME == "homeassistant" assert HomeAssistantDriver.VENDOR == "Home Assistant" assert HomeAssistantDriver.ROLE == "linux" - assert HomeAssistantDriver.TYPE_LABEL == "OS" + assert HomeAssistantDriver.TYPE_LABEL == "Home Assistant OS" assert HomeAssistantDriver.USES_SSH is False assert HomeAssistantDriver.default_port == 8123 assert any(rule.mandatory for rule in HomeAssistantDriver.HTTP_FINGERPRINT) -- 2.54.1