Add model info in fibaro integration (#102551)

This commit is contained in:
rappenze 2023-10-22 22:11:43 +02:00 committed by GitHub
parent 2dfb3ba693
commit 27f6c6fdf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,6 +101,7 @@ class FibaroController:
self._event_callbacks: dict[int, list[Callable[[FibaroEvent], None]]] = {}
self.hub_serial: str # Unique serial number of the hub
self.hub_name: str # The friendly name of the hub
self.hub_model: str
self.hub_software_version: str
self.hub_api_url: str = config[CONF_URL]
# Device infos by fibaro device id
@ -113,6 +114,7 @@ class FibaroController:
info = self._client.read_info()
self.hub_serial = info.serial_number
self.hub_name = info.hc_name
self.hub_model = info.platform
self.hub_software_version = info.current_version
if connected is False:
@ -409,7 +411,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
serial_number=controller.hub_serial,
manufacturer="Fibaro",
name=controller.hub_name,
model=controller.hub_serial,
model=controller.hub_model,
sw_version=controller.hub_software_version,
configuration_url=controller.hub_api_url.removesuffix("/api/"),
)