Cleanup ZHAEntity class (#30131)
Remove `_domain` attribute since we're not using it anymore.
This commit is contained in:
parent
8e3dfbd5c9
commit
9c23c4adf2
7 changed files with 0 additions and 12 deletions
|
@ -102,7 +102,6 @@ async def _async_setup_entities(
|
|||
class BinarySensor(ZhaEntity, BinarySensorDevice):
|
||||
"""ZHA BinarySensor."""
|
||||
|
||||
_domain = DOMAIN
|
||||
_device_class = None
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
|
|
|
@ -30,8 +30,6 @@ RESTART_GRACE_PERIOD = 7200 # 2 hours
|
|||
class ZhaEntity(RestoreEntity, LogMixin, entity.Entity):
|
||||
"""A base class for ZHA entities."""
|
||||
|
||||
_domain = None # Must be overridden by subclasses
|
||||
|
||||
def __init__(self, unique_id, zha_device, channels, skip_entity_id=False, **kwargs):
|
||||
"""Init ZHA entity."""
|
||||
self._force_update = False
|
||||
|
|
|
@ -87,8 +87,6 @@ async def _async_setup_entities(
|
|||
class ZhaFan(ZhaEntity, FanEntity):
|
||||
"""Representation of a ZHA fan."""
|
||||
|
||||
_domain = DOMAIN
|
||||
|
||||
def __init__(self, unique_id, zha_device, channels, **kwargs):
|
||||
"""Init this sensor."""
|
||||
super().__init__(unique_id, zha_device, channels, **kwargs)
|
||||
|
|
|
@ -80,8 +80,6 @@ async def _async_setup_entities(
|
|||
class Light(ZhaEntity, light.Light):
|
||||
"""Representation of a ZHA or ZLL light."""
|
||||
|
||||
_domain = light.DOMAIN
|
||||
|
||||
def __init__(self, unique_id, zha_device, channels, **kwargs):
|
||||
"""Initialize the ZHA light."""
|
||||
super().__init__(unique_id, zha_device, channels, **kwargs)
|
||||
|
|
|
@ -70,8 +70,6 @@ async def _async_setup_entities(
|
|||
class ZhaDoorLock(ZhaEntity, LockDevice):
|
||||
"""Representation of a ZHA lock."""
|
||||
|
||||
_domain = DOMAIN
|
||||
|
||||
def __init__(self, unique_id, zha_device, channels, **kwargs):
|
||||
"""Init this sensor."""
|
||||
super().__init__(unique_id, zha_device, channels, **kwargs)
|
||||
|
|
|
@ -109,7 +109,6 @@ class Sensor(ZhaEntity):
|
|||
_decimals = 1
|
||||
_device_class = None
|
||||
_divisor = 1
|
||||
_domain = DOMAIN
|
||||
_multiplier = 1
|
||||
_unit = None
|
||||
|
||||
|
|
|
@ -60,8 +60,6 @@ async def _async_setup_entities(
|
|||
class Switch(ZhaEntity, SwitchDevice):
|
||||
"""ZHA switch."""
|
||||
|
||||
_domain = DOMAIN
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
"""Initialize the ZHA switch."""
|
||||
super().__init__(**kwargs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue