Cleanup ZHAEntity class (#30131)

Remove `_domain` attribute since we're not using it anymore.
This commit is contained in:
Alexei Chetroi 2019-12-21 18:33:00 -05:00 committed by GitHub
parent 8e3dfbd5c9
commit 9c23c4adf2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 0 additions and 12 deletions

View file

@ -102,7 +102,6 @@ async def _async_setup_entities(
class BinarySensor(ZhaEntity, BinarySensorDevice):
"""ZHA BinarySensor."""
_domain = DOMAIN
_device_class = None
def __init__(self, **kwargs):

View file

@ -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

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -109,7 +109,6 @@ class Sensor(ZhaEntity):
_decimals = 1
_device_class = None
_divisor = 1
_domain = DOMAIN
_multiplier = 1
_unit = None

View file

@ -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)