def device_info(self): """Return the device_info of the device.""" device_info = { "identifiers": {(DOMAIN, self._device.device_id)}, "name": self.name, "manufacturer": MANUFACTURER, "sw_version": self._device.firmware_version, } model = KNOWN_MODELS.get(self._device.device_id[2:4]) if model: device_info["model"] = model return device_info
def device_info(self): """Return the device_info of the device.""" model = (KNOWN_MODELS.get(self._device.device_id[2:4]) if self._device.device_id is not None else None) via_device: tuple[str, str] | None = None if self._device.parent_device_id: via_device = (DOMAIN, self._device.parent_device_id) return DeviceInfo( identifiers={(DOMAIN, self._device.device_id)}, manufacturer=MANUFACTURER, model=model, name=self._device.name, sw_version=self._device.firmware_version, via_device=via_device, )
def device_info(self): """Return the device_info of the device.""" device_info = { "identifiers": {(DOMAIN, self._device.device_id)}, "name": self._device.name, "manufacturer": MANUFACTURER, "sw_version": self._device.firmware_version, } model = ( KNOWN_MODELS.get(self._device.device_id[2:4]) if self._device.device_id is not None else None ) if model: device_info["model"] = model if self._device.parent_device_id: device_info["via_device"] = (DOMAIN, self._device.parent_device_id) return device_info