mirror of
https://github.com/Andre0512/hon.git
synced 2025-05-13 06:34:22 -04:00
Refactor hon entities
This commit is contained in:
parent
696dc136eb
commit
a8762367ed
8 changed files with 382 additions and 369 deletions
|
@ -263,12 +263,6 @@ async def async_setup_entry(hass, entry: ConfigEntry, async_add_entities) -> Non
|
|||
class HonBinarySensorEntity(HonEntity, BinarySensorEntity):
|
||||
entity_description: HonBinarySensorEntityDescription
|
||||
|
||||
def __init__(self, hass, entry, device, description) -> None:
|
||||
super().__init__(hass, entry, device)
|
||||
|
||||
self.entity_description = description
|
||||
self._attr_unique_id = f"{super().unique_id}{description.key}"
|
||||
|
||||
@property
|
||||
def is_on(self) -> bool:
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue