Rename netatmo base entity file (#107857)

This commit is contained in:
Joost Lekkerkerker 2024-01-12 11:30:34 +01:00 committed by GitHub
parent 87b694298f
commit 68ddc1481e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 20 additions and 20 deletions

View File

@ -39,7 +39,7 @@ from .const import (
WEBHOOK_PUSH_TYPE, WEBHOOK_PUSH_TYPE,
) )
from .data_handler import EVENT, HOME, SIGNAL_NAME, NetatmoDevice from .data_handler import EVENT, HOME, SIGNAL_NAME, NetatmoDevice
from .netatmo_entity_base import NetatmoBase from .entity import NetatmoBaseEntity
_LOGGER = logging.getLogger(__name__) _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.""" """Representation of a Netatmo camera."""
_attr_brand = MANUFACTURER _attr_brand = MANUFACTURER

View File

@ -56,7 +56,7 @@ from .const import (
SERVICE_SET_TEMPERATURE_WITH_TIME_PERIOD, SERVICE_SET_TEMPERATURE_WITH_TIME_PERIOD,
) )
from .data_handler import HOME, SIGNAL_NAME, NetatmoRoom from .data_handler import HOME, SIGNAL_NAME, NetatmoRoom
from .netatmo_entity_base import NetatmoBase from .entity import NetatmoBaseEntity
_LOGGER = logging.getLogger(__name__) _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.""" """Representation a Netatmo thermostat."""
_attr_hvac_mode = HVACMode.AUTO _attr_hvac_mode = HVACMode.AUTO

View File

@ -19,7 +19,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import CONF_URL_CONTROL, NETATMO_CREATE_COVER from .const import CONF_URL_CONTROL, NETATMO_CREATE_COVER
from .data_handler import HOME, SIGNAL_NAME, NetatmoDevice from .data_handler import HOME, SIGNAL_NAME, NetatmoDevice
from .netatmo_entity_base import NetatmoBase from .entity import NetatmoBaseEntity
_LOGGER = logging.getLogger(__name__) _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.""" """Representation of a Netatmo cover device."""
_attr_supported_features = ( _attr_supported_features = (

View File

@ -18,7 +18,7 @@ from .const import DATA_DEVICE_IDS, DEFAULT_ATTRIBUTION, DOMAIN, SIGNAL_NAME
from .data_handler import PUBLIC, NetatmoDataHandler from .data_handler import PUBLIC, NetatmoDataHandler
class NetatmoBase(Entity): class NetatmoBaseEntity(Entity):
"""Netatmo entity base class.""" """Netatmo entity base class."""
_attr_attribution = DEFAULT_ATTRIBUTION _attr_attribution = DEFAULT_ATTRIBUTION

View File

@ -23,7 +23,7 @@ from .const import (
WEBHOOK_PUSH_TYPE, WEBHOOK_PUSH_TYPE,
) )
from .data_handler import HOME, SIGNAL_NAME, NetatmoDevice from .data_handler import HOME, SIGNAL_NAME, NetatmoDevice
from .netatmo_entity_base import NetatmoBase from .entity import NetatmoBaseEntity
_LOGGER = logging.getLogger(__name__) _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.""" """Representation of a Netatmo Presence camera light."""
_attr_has_entity_name = True _attr_has_entity_name = True
@ -150,7 +150,7 @@ class NetatmoCameraLight(NetatmoBase, LightEntity):
self._is_on = bool(self._camera.floodlight == "on") self._is_on = bool(self._camera.floodlight == "on")
class NetatmoLight(NetatmoBase, LightEntity): class NetatmoLight(NetatmoBaseEntity, LightEntity):
"""Representation of a dimmable light by Legrand/BTicino.""" """Representation of a dimmable light by Legrand/BTicino."""
def __init__( def __init__(

View File

@ -19,7 +19,7 @@ from .const import (
NETATMO_CREATE_SELECT, NETATMO_CREATE_SELECT,
) )
from .data_handler import HOME, SIGNAL_NAME, NetatmoHome from .data_handler import HOME, SIGNAL_NAME, NetatmoHome
from .netatmo_entity_base import NetatmoBase from .entity import NetatmoBaseEntity
_LOGGER = logging.getLogger(__name__) _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.""" """Representation a Netatmo thermostat schedule selector."""
def __init__( def __init__(

View File

@ -51,8 +51,8 @@ from .const import (
SIGNAL_NAME, SIGNAL_NAME,
) )
from .data_handler import HOME, PUBLIC, NetatmoDataHandler, NetatmoDevice, NetatmoRoom from .data_handler import HOME, PUBLIC, NetatmoDataHandler, NetatmoDevice, NetatmoRoom
from .entity import NetatmoBaseEntity
from .helper import NetatmoArea from .helper import NetatmoArea
from .netatmo_entity_base import NetatmoBase
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
@ -399,7 +399,7 @@ async def async_setup_entry(
await add_public_entities(False) await add_public_entities(False)
class NetatmoWeatherSensor(NetatmoBase, SensorEntity): class NetatmoWeatherSensor(NetatmoBaseEntity, SensorEntity):
"""Implementation of a Netatmo weather/home coach sensor.""" """Implementation of a Netatmo weather/home coach sensor."""
_attr_has_entity_name = True _attr_has_entity_name = True
@ -478,7 +478,7 @@ class NetatmoWeatherSensor(NetatmoBase, SensorEntity):
self.async_write_ha_state() self.async_write_ha_state()
class NetatmoClimateBatterySensor(NetatmoBase, SensorEntity): class NetatmoClimateBatterySensor(NetatmoBaseEntity, SensorEntity):
"""Implementation of a Netatmo sensor.""" """Implementation of a Netatmo sensor."""
entity_description: NetatmoSensorEntityDescription entity_description: NetatmoSensorEntityDescription
@ -525,7 +525,7 @@ class NetatmoClimateBatterySensor(NetatmoBase, SensorEntity):
self._attr_native_value = self._module.battery self._attr_native_value = self._module.battery
class NetatmoSensor(NetatmoBase, SensorEntity): class NetatmoSensor(NetatmoBaseEntity, SensorEntity):
"""Implementation of a Netatmo sensor.""" """Implementation of a Netatmo sensor."""
entity_description: NetatmoSensorEntityDescription entity_description: NetatmoSensorEntityDescription
@ -613,7 +613,7 @@ def process_wifi(strength: int) -> str:
return "Full" return "Full"
class NetatmoRoomSensor(NetatmoBase, SensorEntity): class NetatmoRoomSensor(NetatmoBaseEntity, SensorEntity):
"""Implementation of a Netatmo room sensor.""" """Implementation of a Netatmo room sensor."""
entity_description: NetatmoSensorEntityDescription entity_description: NetatmoSensorEntityDescription
@ -662,7 +662,7 @@ class NetatmoRoomSensor(NetatmoBase, SensorEntity):
self.async_write_ha_state() self.async_write_ha_state()
class NetatmoPublicSensor(NetatmoBase, SensorEntity): class NetatmoPublicSensor(NetatmoBaseEntity, SensorEntity):
"""Represent a single sensor in a Netatmo.""" """Represent a single sensor in a Netatmo."""
_attr_has_entity_name = True _attr_has_entity_name = True

View File

@ -14,7 +14,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import CONF_URL_CONTROL, NETATMO_CREATE_SWITCH from .const import CONF_URL_CONTROL, NETATMO_CREATE_SWITCH
from .data_handler import HOME, SIGNAL_NAME, NetatmoDevice from .data_handler import HOME, SIGNAL_NAME, NetatmoDevice
from .netatmo_entity_base import NetatmoBase from .entity import NetatmoBaseEntity
_LOGGER = logging.getLogger(__name__) _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.""" """Representation of a Netatmo switch device."""
def __init__( def __init__(