mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +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."""
|
"""Support for interacting with Smappee Comport Plugs, Switches and Output Modules."""
|
||||||
from homeassistant.components.switch import SwitchEntity
|
from homeassistant.components.switch import SwitchEntity
|
||||||
|
from homeassistant.helpers.entity import DeviceInfo
|
||||||
|
|
||||||
from .const import DOMAIN
|
from .const import DOMAIN
|
||||||
|
|
||||||
@ -148,15 +149,15 @@ class SmappeeActuator(SwitchEntity):
|
|||||||
)
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def device_info(self):
|
def device_info(self) -> DeviceInfo:
|
||||||
"""Return the device info for this switch."""
|
"""Return the device info for this switch."""
|
||||||
return {
|
return DeviceInfo(
|
||||||
"identifiers": {(DOMAIN, self._service_location.device_serial_number)},
|
identifiers={(DOMAIN, self._service_location.device_serial_number)},
|
||||||
"name": self._service_location.service_location_name,
|
manufacturer="Smappee",
|
||||||
"manufacturer": "Smappee",
|
model=self._service_location.device_model,
|
||||||
"model": self._service_location.device_model,
|
name=self._service_location.service_location_name,
|
||||||
"sw_version": self._service_location.firmware_version,
|
sw_version=self._service_location.firmware_version,
|
||||||
}
|
)
|
||||||
|
|
||||||
async def async_update(self):
|
async def async_update(self):
|
||||||
"""Get the latest data from Smappee and update the state."""
|
"""Get the latest data from Smappee and update the state."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user