diff --git a/homeassistant/components/bond/__init__.py b/homeassistant/components/bond/__init__.py index 95fa740f24c..bcc8e5d5be1 100644 --- a/homeassistant/components/bond/__init__.py +++ b/homeassistant/components/bond/__init__.py @@ -87,6 +87,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: name=hub_name, model=hub.target, sw_version=hub.fw_ver, + hw_version=hub.mcu_ver, suggested_area=hub.location, configuration_url=f"http://{host}", ) diff --git a/homeassistant/components/bond/entity.py b/homeassistant/components/bond/entity.py index 342e407ff48..1beca4895e2 100644 --- a/homeassistant/components/bond/entity.py +++ b/homeassistant/components/bond/entity.py @@ -11,6 +11,7 @@ from aiohttp import ClientError from bond_api import BPUPSubscriptions from homeassistant.const import ( + ATTR_HW_VERSION, ATTR_MODEL, ATTR_NAME, ATTR_SUGGESTED_AREA, @@ -78,6 +79,8 @@ class BondEntity(Entity): device_info[ATTR_MODEL] = self._hub.model if self._hub.fw_ver is not None: device_info[ATTR_SW_VERSION] = self._hub.fw_ver + if self._hub.mcu_ver is not None: + device_info[ATTR_HW_VERSION] = self._hub.mcu_ver else: model_data = [] if self._device.branding_profile: diff --git a/homeassistant/components/bond/utils.py b/homeassistant/components/bond/utils.py index b9dbe07ea50..785d7dfbd00 100644 --- a/homeassistant/components/bond/utils.py +++ b/homeassistant/components/bond/utils.py @@ -207,6 +207,11 @@ class BondHub: """Return this hub firmware version.""" return self._version.get("fw_ver") + @property + def mcu_ver(self) -> str | None: + """Return this hub hardware version.""" + return self._version.get("mcu_ver") + @property def devices(self) -> list[BondDevice]: """Return a list of all devices controlled by this hub.""" diff --git a/tests/components/bond/test_init.py b/tests/components/bond/test_init.py index db54ffdf716..88615d98122 100644 --- a/tests/components/bond/test_init.py +++ b/tests/components/bond/test_init.py @@ -84,6 +84,7 @@ async def test_async_setup_entry_sets_up_hub_and_supported_domains(hass: HomeAss "bondid": "test-bond-id", "target": "test-model", "fw_ver": "test-version", + "mcu_ver": "test-hw-version", } ), patch_setup_entry("cover") as mock_cover_async_setup_entry, patch_setup_entry( "fan" @@ -107,6 +108,7 @@ async def test_async_setup_entry_sets_up_hub_and_supported_domains(hass: HomeAss assert hub.manufacturer == "Olibra" assert hub.model == "test-model" assert hub.sw_version == "test-version" + assert hub.hw_version == "test-hw-version" assert hub.configuration_url == "http://some host" # verify supported domains are setup