2023-08-21 10:04:12 +00:00
|
|
|
"""Base entity for Neato."""
|
2024-03-08 14:04:07 +00:00
|
|
|
|
2023-08-21 10:04:12 +00:00
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
from pybotvac import Robot
|
|
|
|
|
|
|
|
from homeassistant.helpers.device_registry import DeviceInfo
|
|
|
|
from homeassistant.helpers.entity import Entity
|
|
|
|
|
|
|
|
from .const import NEATO_DOMAIN
|
|
|
|
|
|
|
|
|
|
|
|
class NeatoEntity(Entity):
|
|
|
|
"""Base Neato entity."""
|
|
|
|
|
|
|
|
_attr_has_entity_name = True
|
|
|
|
|
|
|
|
def __init__(self, robot: Robot) -> None:
|
|
|
|
"""Initialize Neato entity."""
|
|
|
|
self.robot = robot
|
2023-09-05 14:33:46 +00:00
|
|
|
self._attr_device_info: DeviceInfo = DeviceInfo(
|
2023-08-21 10:04:12 +00:00
|
|
|
identifiers={(NEATO_DOMAIN, self.robot.serial)},
|
|
|
|
name=self.robot.name,
|
|
|
|
)
|