mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 22:37:11 +00:00
Use DeviceInfo in subaru (#58577)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
11661454ac
commit
6cfa5b2a28
@ -1,4 +1,5 @@
|
||||
"""Base class for all Subaru Entities."""
|
||||
from homeassistant.helpers.entity import DeviceInfo
|
||||
from homeassistant.helpers.update_coordinator import CoordinatorEntity
|
||||
|
||||
from .const import DOMAIN, MANUFACTURER, VEHICLE_NAME, VEHICLE_VIN
|
||||
@ -25,10 +26,10 @@ class SubaruEntity(CoordinatorEntity):
|
||||
return f"{self.vin}_{self.entity_type}"
|
||||
|
||||
@property
|
||||
def device_info(self):
|
||||
def device_info(self) -> DeviceInfo:
|
||||
"""Return the device_info of the device."""
|
||||
return {
|
||||
"identifiers": {(DOMAIN, self.vin)},
|
||||
"name": self.car_name,
|
||||
"manufacturer": MANUFACTURER,
|
||||
}
|
||||
return DeviceInfo(
|
||||
identifiers={(DOMAIN, self.vin)},
|
||||
manufacturer=MANUFACTURER,
|
||||
name=self.car_name,
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user