Rename netatmo base entity file (#107857)
This commit is contained in:
parent
87b694298f
commit
68ddc1481e
8 changed files with 20 additions and 20 deletions
|
@ -39,7 +39,7 @@ from .const import (
|
|||
WEBHOOK_PUSH_TYPE,
|
||||
)
|
||||
from .data_handler import EVENT, HOME, SIGNAL_NAME, NetatmoDevice
|
||||
from .netatmo_entity_base import NetatmoBase
|
||||
from .entity import NetatmoBaseEntity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -79,7 +79,7 @@ async def async_setup_entry(
|
|||
)
|
||||
|
||||
|
||||
class NetatmoCamera(NetatmoBase, Camera):
|
||||
class NetatmoCamera(NetatmoBaseEntity, Camera):
|
||||
"""Representation of a Netatmo camera."""
|
||||
|
||||
_attr_brand = MANUFACTURER
|
||||
|
|
|
@ -56,7 +56,7 @@ from .const import (
|
|||
SERVICE_SET_TEMPERATURE_WITH_TIME_PERIOD,
|
||||
)
|
||||
from .data_handler import HOME, SIGNAL_NAME, NetatmoRoom
|
||||
from .netatmo_entity_base import NetatmoBase
|
||||
from .entity import NetatmoBaseEntity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -178,7 +178,7 @@ async def async_setup_entry(
|
|||
)
|
||||
|
||||
|
||||
class NetatmoThermostat(NetatmoBase, ClimateEntity):
|
||||
class NetatmoThermostat(NetatmoBaseEntity, ClimateEntity):
|
||||
"""Representation a Netatmo thermostat."""
|
||||
|
||||
_attr_hvac_mode = HVACMode.AUTO
|
||||
|
|
|
@ -19,7 +19,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
|||
|
||||
from .const import CONF_URL_CONTROL, NETATMO_CREATE_COVER
|
||||
from .data_handler import HOME, SIGNAL_NAME, NetatmoDevice
|
||||
from .netatmo_entity_base import NetatmoBase
|
||||
from .entity import NetatmoBaseEntity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -42,7 +42,7 @@ async def async_setup_entry(
|
|||
)
|
||||
|
||||
|
||||
class NetatmoCover(NetatmoBase, CoverEntity):
|
||||
class NetatmoCover(NetatmoBaseEntity, CoverEntity):
|
||||
"""Representation of a Netatmo cover device."""
|
||||
|
||||
_attr_supported_features = (
|
||||
|
|
|
@ -18,7 +18,7 @@ from .const import DATA_DEVICE_IDS, DEFAULT_ATTRIBUTION, DOMAIN, SIGNAL_NAME
|
|||
from .data_handler import PUBLIC, NetatmoDataHandler
|
||||
|
||||
|
||||
class NetatmoBase(Entity):
|
||||
class NetatmoBaseEntity(Entity):
|
||||
"""Netatmo entity base class."""
|
||||
|
||||
_attr_attribution = DEFAULT_ATTRIBUTION
|
|
@ -23,7 +23,7 @@ from .const import (
|
|||
WEBHOOK_PUSH_TYPE,
|
||||
)
|
||||
from .data_handler import HOME, SIGNAL_NAME, NetatmoDevice
|
||||
from .netatmo_entity_base import NetatmoBase
|
||||
from .entity import NetatmoBaseEntity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -61,7 +61,7 @@ async def async_setup_entry(
|
|||
)
|
||||
|
||||
|
||||
class NetatmoCameraLight(NetatmoBase, LightEntity):
|
||||
class NetatmoCameraLight(NetatmoBaseEntity, LightEntity):
|
||||
"""Representation of a Netatmo Presence camera light."""
|
||||
|
||||
_attr_has_entity_name = True
|
||||
|
@ -150,7 +150,7 @@ class NetatmoCameraLight(NetatmoBase, LightEntity):
|
|||
self._is_on = bool(self._camera.floodlight == "on")
|
||||
|
||||
|
||||
class NetatmoLight(NetatmoBase, LightEntity):
|
||||
class NetatmoLight(NetatmoBaseEntity, LightEntity):
|
||||
"""Representation of a dimmable light by Legrand/BTicino."""
|
||||
|
||||
def __init__(
|
||||
|
|
|
@ -19,7 +19,7 @@ from .const import (
|
|||
NETATMO_CREATE_SELECT,
|
||||
)
|
||||
from .data_handler import HOME, SIGNAL_NAME, NetatmoHome
|
||||
from .netatmo_entity_base import NetatmoBase
|
||||
from .entity import NetatmoBaseEntity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -39,7 +39,7 @@ async def async_setup_entry(
|
|||
)
|
||||
|
||||
|
||||
class NetatmoScheduleSelect(NetatmoBase, SelectEntity):
|
||||
class NetatmoScheduleSelect(NetatmoBaseEntity, SelectEntity):
|
||||
"""Representation a Netatmo thermostat schedule selector."""
|
||||
|
||||
def __init__(
|
||||
|
|
|
@ -51,8 +51,8 @@ from .const import (
|
|||
SIGNAL_NAME,
|
||||
)
|
||||
from .data_handler import HOME, PUBLIC, NetatmoDataHandler, NetatmoDevice, NetatmoRoom
|
||||
from .entity import NetatmoBaseEntity
|
||||
from .helper import NetatmoArea
|
||||
from .netatmo_entity_base import NetatmoBase
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -399,7 +399,7 @@ async def async_setup_entry(
|
|||
await add_public_entities(False)
|
||||
|
||||
|
||||
class NetatmoWeatherSensor(NetatmoBase, SensorEntity):
|
||||
class NetatmoWeatherSensor(NetatmoBaseEntity, SensorEntity):
|
||||
"""Implementation of a Netatmo weather/home coach sensor."""
|
||||
|
||||
_attr_has_entity_name = True
|
||||
|
@ -478,7 +478,7 @@ class NetatmoWeatherSensor(NetatmoBase, SensorEntity):
|
|||
self.async_write_ha_state()
|
||||
|
||||
|
||||
class NetatmoClimateBatterySensor(NetatmoBase, SensorEntity):
|
||||
class NetatmoClimateBatterySensor(NetatmoBaseEntity, SensorEntity):
|
||||
"""Implementation of a Netatmo sensor."""
|
||||
|
||||
entity_description: NetatmoSensorEntityDescription
|
||||
|
@ -525,7 +525,7 @@ class NetatmoClimateBatterySensor(NetatmoBase, SensorEntity):
|
|||
self._attr_native_value = self._module.battery
|
||||
|
||||
|
||||
class NetatmoSensor(NetatmoBase, SensorEntity):
|
||||
class NetatmoSensor(NetatmoBaseEntity, SensorEntity):
|
||||
"""Implementation of a Netatmo sensor."""
|
||||
|
||||
entity_description: NetatmoSensorEntityDescription
|
||||
|
@ -613,7 +613,7 @@ def process_wifi(strength: int) -> str:
|
|||
return "Full"
|
||||
|
||||
|
||||
class NetatmoRoomSensor(NetatmoBase, SensorEntity):
|
||||
class NetatmoRoomSensor(NetatmoBaseEntity, SensorEntity):
|
||||
"""Implementation of a Netatmo room sensor."""
|
||||
|
||||
entity_description: NetatmoSensorEntityDescription
|
||||
|
@ -662,7 +662,7 @@ class NetatmoRoomSensor(NetatmoBase, SensorEntity):
|
|||
self.async_write_ha_state()
|
||||
|
||||
|
||||
class NetatmoPublicSensor(NetatmoBase, SensorEntity):
|
||||
class NetatmoPublicSensor(NetatmoBaseEntity, SensorEntity):
|
||||
"""Represent a single sensor in a Netatmo."""
|
||||
|
||||
_attr_has_entity_name = True
|
||||
|
|
|
@ -14,7 +14,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
|||
|
||||
from .const import CONF_URL_CONTROL, NETATMO_CREATE_SWITCH
|
||||
from .data_handler import HOME, SIGNAL_NAME, NetatmoDevice
|
||||
from .netatmo_entity_base import NetatmoBase
|
||||
from .entity import NetatmoBaseEntity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -37,7 +37,7 @@ async def async_setup_entry(
|
|||
)
|
||||
|
||||
|
||||
class NetatmoSwitch(NetatmoBase, SwitchEntity):
|
||||
class NetatmoSwitch(NetatmoBaseEntity, SwitchEntity):
|
||||
"""Representation of a Netatmo switch device."""
|
||||
|
||||
def __init__(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue