Use DeviceInfo in somfy-mylink (#58573)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
f7797328e6
commit
3e4d388491
1 changed files with 7 additions and 6 deletions
|
@ -8,6 +8,7 @@ from homeassistant.components.cover import (
|
|||
CoverEntity,
|
||||
)
|
||||
from homeassistant.const import STATE_CLOSED, STATE_OPEN
|
||||
from homeassistant.helpers.entity import DeviceInfo
|
||||
from homeassistant.helpers.restore_state import RestoreEntity
|
||||
|
||||
from .const import (
|
||||
|
@ -115,13 +116,13 @@ class SomfyShade(RestoreEntity, CoverEntity):
|
|||
return self._closed
|
||||
|
||||
@property
|
||||
def device_info(self):
|
||||
def device_info(self) -> DeviceInfo:
|
||||
"""Return the device_info of the device."""
|
||||
return {
|
||||
"identifiers": {(DOMAIN, self._target_id)},
|
||||
"name": self._name,
|
||||
"manufacturer": MANUFACTURER,
|
||||
}
|
||||
return DeviceInfo(
|
||||
identifiers={(DOMAIN, self._target_id)},
|
||||
manufacturer=MANUFACTURER,
|
||||
name=self._name,
|
||||
)
|
||||
|
||||
async def async_close_cover(self, **kwargs):
|
||||
"""Close the cover."""
|
||||
|
|
Loading…
Add table
Reference in a new issue