Replace dict with DeviceInfo (#49950)
* Replace dict with DeviceInfo * Clean up Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
ddd7e79ee9
commit
29d72714f3
70 changed files with 159 additions and 138 deletions
|
@ -10,6 +10,7 @@ from pylitterbot import Robot
|
|||
from pylitterbot.exceptions import InvalidCommandException
|
||||
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.helpers.entity import DeviceInfo
|
||||
from homeassistant.helpers.event import async_call_later
|
||||
from homeassistant.helpers.update_coordinator import CoordinatorEntity
|
||||
import homeassistant.util.dt as dt_util
|
||||
|
@ -43,7 +44,7 @@ class LitterRobotEntity(CoordinatorEntity):
|
|||
return f"{self.robot.serial}-{self.entity_type}"
|
||||
|
||||
@property
|
||||
def device_info(self) -> dict[str, Any]:
|
||||
def device_info(self) -> DeviceInfo:
|
||||
"""Return the device information for a Litter-Robot."""
|
||||
return {
|
||||
"identifiers": {(DOMAIN, self.robot.serial)},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue