Skip to content
Snippets Groups Projects
Unverified Commit 6cfa5b2a authored by epenet's avatar epenet Committed by GitHub
Browse files

Use DeviceInfo in subaru (#58577)

parent 11661454
No related branches found
No related tags found
No related merge requests found
"""Base class for all Subaru Entities.""" """Base class for all Subaru Entities."""
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.update_coordinator import CoordinatorEntity from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .const import DOMAIN, MANUFACTURER, VEHICLE_NAME, VEHICLE_VIN from .const import DOMAIN, MANUFACTURER, VEHICLE_NAME, VEHICLE_VIN
...@@ -25,10 +26,10 @@ class SubaruEntity(CoordinatorEntity): ...@@ -25,10 +26,10 @@ class SubaruEntity(CoordinatorEntity):
return f"{self.vin}_{self.entity_type}" return f"{self.vin}_{self.entity_type}"
@property @property
def device_info(self): def device_info(self) -> DeviceInfo:
"""Return the device_info of the device.""" """Return the device_info of the device."""
return { return DeviceInfo(
"identifiers": {(DOMAIN, self.vin)}, identifiers={(DOMAIN, self.vin)},
"name": self.car_name, manufacturer=MANUFACTURER,
"manufacturer": MANUFACTURER, name=self.car_name,
} )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment