From f874ba1355c499bdf532e98ad3ee2f4c0fec5c4e Mon Sep 17 00:00:00 2001 From: cdnninja Date: Thu, 27 Nov 2025 23:20:50 -0700 Subject: [PATCH] Move device_info to attribute in vesync (#157462) --- homeassistant/components/vesync/entity.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/homeassistant/components/vesync/entity.py b/homeassistant/components/vesync/entity.py index 023e1a10c55..fdeef26f699 100644 --- a/homeassistant/components/vesync/entity.py +++ b/homeassistant/components/vesync/entity.py @@ -21,6 +21,13 @@ class VeSyncBaseEntity(CoordinatorEntity[VeSyncDataCoordinator]): super().__init__(coordinator) self.device = device self._attr_unique_id = self.base_unique_id + self._attr_device_info = DeviceInfo( + identifiers={(DOMAIN, self.base_unique_id)}, + name=self.device.device_name, + model=self.device.device_type, + manufacturer="VeSync", + sw_version=self.device.current_firm_version, + ) @property def base_unique_id(self): @@ -36,14 +43,3 @@ class VeSyncBaseEntity(CoordinatorEntity[VeSyncDataCoordinator]): def available(self) -> bool: """Return True if device is available.""" return self.device.state.connection_status == "online" - - @property - def device_info(self) -> DeviceInfo: - """Return device information.""" - return DeviceInfo( - identifiers={(DOMAIN, self.base_unique_id)}, - name=self.device.device_name, - model=self.device.device_type, - manufacturer="VeSync", - sw_version=self.device.current_firm_version, - )