Improve Anova typing (#99146)
This commit is contained in:
parent
a48c7f67b4
commit
65103d4515
3 changed files with 14 additions and 13 deletions
|
@ -8,18 +8,19 @@ from .coordinator import AnovaCoordinator
|
|||
|
||||
|
||||
class AnovaEntity(CoordinatorEntity[AnovaCoordinator], Entity):
|
||||
"""Defines a Anova entity."""
|
||||
"""Defines an Anova entity."""
|
||||
|
||||
_attr_has_entity_name = True
|
||||
|
||||
def __init__(self, coordinator: AnovaCoordinator) -> None:
|
||||
"""Initialize the Anova entity."""
|
||||
super().__init__(coordinator)
|
||||
self.device = coordinator.anova_device
|
||||
self._attr_device_info = coordinator.device_info
|
||||
self._attr_has_entity_name = True
|
||||
|
||||
|
||||
class AnovaDescriptionEntity(AnovaEntity, Entity):
|
||||
"""Defines a Anova entity that uses a description."""
|
||||
class AnovaDescriptionEntity(AnovaEntity):
|
||||
"""Defines an Anova entity that uses a description."""
|
||||
|
||||
def __init__(
|
||||
self, coordinator: AnovaCoordinator, description: EntityDescription
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue