Fix firmware version parsing in venstar (#127974)

This commit is contained in:
epenet 2024-10-09 09:56:53 +02:00 committed by GitHub
parent 99eb466223
commit 053e2a52b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -34,11 +34,11 @@ class VenstarEntity(CoordinatorEntity[VenstarDataUpdateCoordinator]):
@property @property
def device_info(self) -> DeviceInfo: def device_info(self) -> DeviceInfo:
"""Return the device information for this entity.""" """Return the device information for this entity."""
fw_ver_major, fw_ver_minor = self._client.get_firmware_ver() firmware_version = self._client.get_firmware_ver()
return DeviceInfo( return DeviceInfo(
identifiers={(DOMAIN, self._config.entry_id)}, identifiers={(DOMAIN, self._config.entry_id)},
name=self._client.name, name=self._client.name,
manufacturer="Venstar", manufacturer="Venstar",
model=f"{self._client.model}-{self._client.get_type()}", model=f"{self._client.model}-{self._client.get_type()}",
sw_version=f"{fw_ver_major}.{fw_ver_minor}", sw_version=f"{firmware_version[0]}.{firmware_version[1]}",
) )