From 2fe3c4414022cf45579322b7b71ccd3de26105cf Mon Sep 17 00:00:00 2001 From: epenet Date: Wed, 27 Oct 2021 12:21:32 +0000 Subject: [PATCH] Use DeviceInfo in subaru --- homeassistant/components/subaru/entity.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/subaru/entity.py b/homeassistant/components/subaru/entity.py index 559feeea303ca1..2bdb1425b2d64c 100644 --- a/homeassistant/components/subaru/entity.py +++ b/homeassistant/components/subaru/entity.py @@ -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 @@ def unique_id(self) -> str: 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, + )