mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Use DeviceInfo in smartthings (#58523)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
80bbfde07e
commit
6db7f73032
@ -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."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user