diff --git a/homeassistant/components/sunweg/sensor.py b/homeassistant/components/sunweg/sensor/__init__.py similarity index 93% rename from homeassistant/components/sunweg/sensor.py rename to homeassistant/components/sunweg/sensor/__init__.py index 004dd7276a7..e582b5135d3 100644 --- a/homeassistant/components/sunweg/sensor.py +++ b/homeassistant/components/sunweg/sensor/__init__.py @@ -17,13 +17,13 @@ from homeassistant.core import HomeAssistant from homeassistant.helpers.device_registry import DeviceInfo from homeassistant.helpers.entity_platform import AddEntitiesCallback -from . import SunWEGData -from .const import CONF_PLANT_ID, DEFAULT_PLANT_ID, DOMAIN, DeviceType -from .sensor_types.inverter import INVERTER_SENSOR_TYPES -from .sensor_types.phase import PHASE_SENSOR_TYPES -from .sensor_types.sensor_entity_description import SunWEGSensorEntityDescription -from .sensor_types.string import STRING_SENSOR_TYPES -from .sensor_types.total import TOTAL_SENSOR_TYPES +from .. import SunWEGData +from ..const import CONF_PLANT_ID, DEFAULT_PLANT_ID, DOMAIN, DeviceType +from .inverter import INVERTER_SENSOR_TYPES +from .phase import PHASE_SENSOR_TYPES +from .sensor_entity_description import SunWEGSensorEntityDescription +from .string import STRING_SENSOR_TYPES +from .total import TOTAL_SENSOR_TYPES _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/sunweg/sensor_types/inverter.py b/homeassistant/components/sunweg/sensor/inverter.py similarity index 100% rename from homeassistant/components/sunweg/sensor_types/inverter.py rename to homeassistant/components/sunweg/sensor/inverter.py diff --git a/homeassistant/components/sunweg/sensor_types/phase.py b/homeassistant/components/sunweg/sensor/phase.py similarity index 100% rename from homeassistant/components/sunweg/sensor_types/phase.py rename to homeassistant/components/sunweg/sensor/phase.py diff --git a/homeassistant/components/sunweg/sensor_types/sensor_entity_description.py b/homeassistant/components/sunweg/sensor/sensor_entity_description.py similarity index 92% rename from homeassistant/components/sunweg/sensor_types/sensor_entity_description.py rename to homeassistant/components/sunweg/sensor/sensor_entity_description.py index 1d06f04ab3d..8c792ab617f 100644 --- a/homeassistant/components/sunweg/sensor_types/sensor_entity_description.py +++ b/homeassistant/components/sunweg/sensor/sensor_entity_description.py @@ -15,7 +15,6 @@ class SunWEGRequiredKeysMixin: @dataclass(frozen=True) -# pylint: disable-next=hass-enforce-class-module class SunWEGSensorEntityDescription(SensorEntityDescription, SunWEGRequiredKeysMixin): """Describes SunWEG sensor entity.""" diff --git a/homeassistant/components/sunweg/sensor_types/string.py b/homeassistant/components/sunweg/sensor/string.py similarity index 100% rename from homeassistant/components/sunweg/sensor_types/string.py rename to homeassistant/components/sunweg/sensor/string.py diff --git a/homeassistant/components/sunweg/sensor_types/total.py b/homeassistant/components/sunweg/sensor/total.py similarity index 100% rename from homeassistant/components/sunweg/sensor_types/total.py rename to homeassistant/components/sunweg/sensor/total.py diff --git a/homeassistant/components/sunweg/sensor_types/__init__.py b/homeassistant/components/sunweg/sensor_types/__init__.py deleted file mode 100644 index f370fddd16b..00000000000 --- a/homeassistant/components/sunweg/sensor_types/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Sensor types for supported Sun WEG systems.""" diff --git a/tests/components/sunweg/test_init.py b/tests/components/sunweg/test_init.py index 41edda38a5a..6cbe38a128b 100644 --- a/tests/components/sunweg/test_init.py +++ b/tests/components/sunweg/test_init.py @@ -7,7 +7,7 @@ from sunweg.api import APIHelper, SunWegApiError from homeassistant.components.sunweg import SunWEGData from homeassistant.components.sunweg.const import DOMAIN, DeviceType -from homeassistant.components.sunweg.sensor_types.sensor_entity_description import ( +from homeassistant.components.sunweg.sensor.sensor_entity_description import ( SunWEGSensorEntityDescription, ) from homeassistant.config_entries import ConfigEntryState