From 6db7f7303264302a991a94f64fe53d8066071078 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Wed, 27 Oct 2021 13:17:47 +0200 Subject: [PATCH] Use DeviceInfo in smartthings (#58523) Co-authored-by: epenet --- homeassistant/components/smappee/switch.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/homeassistant/components/smappee/switch.py b/homeassistant/components/smappee/switch.py index ded898f9f10..a8a92c5cd8e 100644 --- a/homeassistant/components/smappee/switch.py +++ b/homeassistant/components/smappee/switch.py @@ -1,5 +1,6 @@ """Support for interacting with Smappee Comport Plugs, Switches and Output Modules.""" from homeassistant.components.switch import SwitchEntity +from homeassistant.helpers.entity import DeviceInfo from .const import DOMAIN @@ -148,15 +149,15 @@ class SmappeeActuator(SwitchEntity): ) @property - def device_info(self): + def device_info(self) -> DeviceInfo: """Return the device info for this switch.""" - return { - "identifiers": {(DOMAIN, self._service_location.device_serial_number)}, - "name": self._service_location.service_location_name, - "manufacturer": "Smappee", - "model": self._service_location.device_model, - "sw_version": self._service_location.firmware_version, - } + return DeviceInfo( + identifiers={(DOMAIN, self._service_location.device_serial_number)}, + manufacturer="Smappee", + model=self._service_location.device_model, + name=self._service_location.service_location_name, + sw_version=self._service_location.firmware_version, + ) async def async_update(self): """Get the latest data from Smappee and update the state."""