Improve device info

This commit is contained in:
Andre Basche 2024-03-30 19:46:24 +01:00
parent 09189ff0f8
commit 510c10bd9f

View file

@ -42,10 +42,12 @@ class HonEntity(CoordinatorEntity[DataUpdateCoordinator[dict[str, Any]]]):
def device_info(self) -> DeviceInfo: def device_info(self) -> DeviceInfo:
return DeviceInfo( return DeviceInfo(
identifiers={(DOMAIN, self._device.unique_id)}, identifiers={(DOMAIN, self._device.unique_id)},
manufacturer=self._device.get("brand", ""), manufacturer=self._device.get("brand", "").capitalize(),
name=self._device.nick_name, name=self._device.nick_name,
model=self._device.model_name, model=self._device.model_name,
sw_version=self._device.get("fwVersion", ""), sw_version=self._device.get("fwVersion", ""),
hw_version=f"{self._device.appliance_type}{self._device.model_id}",
serial_number=self._device.get("serialNumber", "")
) )
@callback @callback