Home Assistant Unofficial Reference 2024.12.1
entity.py
Go to the documentation of this file.
1 """Base entity for Neato."""
2 
3 from __future__ import annotations
4 
5 from pybotvac import Robot
6 
7 from homeassistant.helpers.device_registry import DeviceInfo
8 from homeassistant.helpers.entity import Entity
9 
10 from .const import NEATO_DOMAIN
11 
12 
14  """Base Neato entity."""
15 
16  _attr_has_entity_name = True
17 
18  def __init__(self, robot: Robot) -> None:
19  """Initialize Neato entity."""
20  self.robotrobot = robot
21  self._attr_device_info: DeviceInfo = DeviceInfo(
22  identifiers={(NEATO_DOMAIN, self.robotrobot.serial)},
23  name=self.robotrobot.name,
24  )