diff --git a/esphome/components/optolink/binary_sensor.py b/esphome/components/optolink/binary_sensor/__init__.py similarity index 90% rename from esphome/components/optolink/binary_sensor.py rename to esphome/components/optolink/binary_sensor/__init__.py index 9d1495437e..4f20fca563 100644 --- a/esphome/components/optolink/binary_sensor.py +++ b/esphome/components/optolink/binary_sensor/__init__.py @@ -1,7 +1,7 @@ import esphome.codegen as cg from esphome.components import binary_sensor from esphome.const import CONF_ADDRESS, CONF_ID -from . import SENSOR_BASE_SCHEMA, optolink_ns, CONF_OPTOLINK_ID +from .. import SENSOR_BASE_SCHEMA, optolink_ns, CONF_OPTOLINK_ID OptolinkBinarySensor = optolink_ns.class_( "OptolinkBinarySensor", binary_sensor.BinarySensor, cg.PollingComponent diff --git a/esphome/components/optolink/optolink_binary_sensor.h b/esphome/components/optolink/binary_sensor/optolink_binary_sensor.h similarity index 92% rename from esphome/components/optolink/optolink_binary_sensor.h rename to esphome/components/optolink/binary_sensor/optolink_binary_sensor.h index 6ec63cc855..b3565030f2 100644 --- a/esphome/components/optolink/optolink_binary_sensor.h +++ b/esphome/components/optolink/binary_sensor/optolink_binary_sensor.h @@ -3,8 +3,8 @@ #ifdef USE_ARDUINO #include "esphome/components/binary_sensor/binary_sensor.h" -#include "optolink.h" -#include "optolink_sensor_base.h" +#include "../optolink.h" +#include "../optolink_sensor_base.h" #include "VitoWiFi.h" namespace esphome { diff --git a/esphome/components/optolink/number.py b/esphome/components/optolink/number/__init__.py similarity index 94% rename from esphome/components/optolink/number.py rename to esphome/components/optolink/number/__init__.py index ab9a4e8c09..5e81852e33 100644 --- a/esphome/components/optolink/number.py +++ b/esphome/components/optolink/number/__init__.py @@ -10,8 +10,7 @@ from esphome.const import ( CONF_MIN_VALUE, CONF_STEP, ) -from .sensor import SENSOR_BASE_SCHEMA -from . import optolink_ns, CONF_OPTOLINK_ID +from .. import optolink_ns, CONF_OPTOLINK_ID, SENSOR_BASE_SCHEMA OptolinkNumber = optolink_ns.class_( "OptolinkNumber", number.Number, cg.PollingComponent diff --git a/esphome/components/optolink/optolink_number.cpp b/esphome/components/optolink/number/optolink_number.cpp similarity index 96% rename from esphome/components/optolink/optolink_number.cpp rename to esphome/components/optolink/number/optolink_number.cpp index 3039d219fb..97877a573a 100644 --- a/esphome/components/optolink/optolink_number.cpp +++ b/esphome/components/optolink/number/optolink_number.cpp @@ -1,7 +1,7 @@ #ifdef USE_ARDUINO #include "optolink_number.h" -#include "optolink.h" +#include "../optolink.h" #include "VitoWiFi.h" namespace esphome { diff --git a/esphome/components/optolink/optolink_number.h b/esphome/components/optolink/number/optolink_number.h similarity index 92% rename from esphome/components/optolink/optolink_number.h rename to esphome/components/optolink/number/optolink_number.h index 6b8409d539..d12db821d3 100644 --- a/esphome/components/optolink/optolink_number.h +++ b/esphome/components/optolink/number/optolink_number.h @@ -3,8 +3,8 @@ #ifdef USE_ARDUINO #include "esphome/components/number/number.h" -#include "optolink_sensor_base.h" -#include "optolink.h" +#include "../optolink_sensor_base.h" +#include "../optolink.h" #include "VitoWiFi.h" namespace esphome { diff --git a/esphome/components/optolink/select.py b/esphome/components/optolink/select/__init__.py similarity index 95% rename from esphome/components/optolink/select.py rename to esphome/components/optolink/select/__init__.py index 779800efef..c959b4e5bd 100644 --- a/esphome/components/optolink/select.py +++ b/esphome/components/optolink/select/__init__.py @@ -9,8 +9,7 @@ from esphome.const import ( CONF_ID, CONF_TO, ) -from . import optolink_ns, CONF_OPTOLINK_ID -from .sensor import SENSOR_BASE_SCHEMA +from .. import optolink_ns, CONF_OPTOLINK_ID, SENSOR_BASE_SCHEMA OptolinkSelect = optolink_ns.class_( "OptolinkSelect", select.Select, cg.PollingComponent diff --git a/esphome/components/optolink/optolink_select.cpp b/esphome/components/optolink/select/optolink_select.cpp similarity index 98% rename from esphome/components/optolink/optolink_select.cpp rename to esphome/components/optolink/select/optolink_select.cpp index 783c614bce..4bdf6201f1 100644 --- a/esphome/components/optolink/optolink_select.cpp +++ b/esphome/components/optolink/select/optolink_select.cpp @@ -1,7 +1,7 @@ #ifdef USE_ARDUINO #include "optolink_select.h" -#include "optolink.h" +#include "../optolink.h" #include "VitoWiFi.h" namespace esphome { diff --git a/esphome/components/optolink/optolink_select.h b/esphome/components/optolink/select/optolink_select.h similarity index 94% rename from esphome/components/optolink/optolink_select.h rename to esphome/components/optolink/select/optolink_select.h index 995c9923f3..b7a5eab47e 100644 --- a/esphome/components/optolink/optolink_select.h +++ b/esphome/components/optolink/select/optolink_select.h @@ -4,8 +4,8 @@ #include #include "esphome/components/select/select.h" -#include "optolink.h" -#include "optolink_sensor_base.h" +#include "../optolink.h" +#include "../optolink_sensor_base.h" #include "VitoWiFi.h" namespace esphome { diff --git a/esphome/components/optolink/sensor.py b/esphome/components/optolink/sensor/__init__.py similarity index 93% rename from esphome/components/optolink/sensor.py rename to esphome/components/optolink/sensor/__init__.py index a403f302a8..360ecaf385 100644 --- a/esphome/components/optolink/sensor.py +++ b/esphome/components/optolink/sensor/__init__.py @@ -7,7 +7,7 @@ from esphome.const import ( CONF_DIV_RATIO, CONF_ID, ) -from . import CONF_OPTOLINK_ID, SENSOR_BASE_SCHEMA, optolink_ns +from .. import CONF_OPTOLINK_ID, SENSOR_BASE_SCHEMA, optolink_ns OptolinkSensor = optolink_ns.class_( "OptolinkSensor", sensor.Sensor, cg.PollingComponent diff --git a/esphome/components/optolink/optolink_sensor.h b/esphome/components/optolink/sensor/optolink_sensor.h similarity index 92% rename from esphome/components/optolink/optolink_sensor.h rename to esphome/components/optolink/sensor/optolink_sensor.h index 032af7a03e..f0a7da49ac 100644 --- a/esphome/components/optolink/optolink_sensor.h +++ b/esphome/components/optolink/sensor/optolink_sensor.h @@ -3,8 +3,8 @@ #ifdef USE_ARDUINO #include "esphome/components/sensor/sensor.h" -#include "optolink.h" -#include "optolink_sensor_base.h" +#include "../optolink.h" +#include "../optolink_sensor_base.h" #include "VitoWiFi.h" namespace esphome { diff --git a/esphome/components/optolink/switch.py b/esphome/components/optolink/switch/__init__.py similarity index 96% rename from esphome/components/optolink/switch.py rename to esphome/components/optolink/switch/__init__.py index 32540cdf0f..464e9feea3 100644 --- a/esphome/components/optolink/switch.py +++ b/esphome/components/optolink/switch/__init__.py @@ -3,7 +3,7 @@ import esphome.codegen as cg import esphome.config_validation as cv from esphome.components import switch from esphome.const import CONF_ADDRESS, CONF_ID, CONF_UPDATE_INTERVAL -from . import OptolinkComponent, optolink_ns +from .. import OptolinkComponent, optolink_ns OptolinkSwitch = optolink_ns.class_( "OptolinkSwitch", switch.Switch, cg.PollingComponent diff --git a/esphome/components/optolink/optolink_switch.cpp b/esphome/components/optolink/switch/optolink_switch.cpp similarity index 96% rename from esphome/components/optolink/optolink_switch.cpp rename to esphome/components/optolink/switch/optolink_switch.cpp index 066f11a1a4..4b08e9bda0 100644 --- a/esphome/components/optolink/optolink_switch.cpp +++ b/esphome/components/optolink/switch/optolink_switch.cpp @@ -1,7 +1,7 @@ #ifdef USE_ARDUINO #include "optolink_switch.h" -#include "optolink.h" +#include "../optolink.h" #include "VitoWiFi.h" namespace esphome { diff --git a/esphome/components/optolink/optolink_switch.h b/esphome/components/optolink/switch/optolink_switch.h similarity index 92% rename from esphome/components/optolink/optolink_switch.h rename to esphome/components/optolink/switch/optolink_switch.h index 970e7a1a67..e1a4ebfb80 100644 --- a/esphome/components/optolink/optolink_switch.h +++ b/esphome/components/optolink/switch/optolink_switch.h @@ -3,8 +3,8 @@ #ifdef USE_ARDUINO #include "esphome/components/switch/switch.h" -#include "optolink_sensor_base.h" -#include "optolink.h" +#include "../optolink_sensor_base.h" +#include "../optolink.h" #include "VitoWiFi.h" namespace esphome { diff --git a/esphome/components/optolink/text_sensor.py b/esphome/components/optolink/text_sensor/__init__.py similarity index 96% rename from esphome/components/optolink/text_sensor.py rename to esphome/components/optolink/text_sensor/__init__.py index ea6fb4c0bf..aaad5837e4 100644 --- a/esphome/components/optolink/text_sensor.py +++ b/esphome/components/optolink/text_sensor/__init__.py @@ -8,8 +8,7 @@ from esphome.const import ( CONF_ID, CONF_MODE, ) -from . import optolink_ns, CONF_OPTOLINK_ID -from .sensor import SENSOR_BASE_SCHEMA +from .. import optolink_ns, CONF_OPTOLINK_ID, SENSOR_BASE_SCHEMA OptolinkTextSensor = optolink_ns.class_( "OptolinkTextSensor", text_sensor.TextSensor, cg.PollingComponent diff --git a/esphome/components/optolink/optolink_device_info_sensor.cpp b/esphome/components/optolink/text_sensor/optolink_device_info_sensor.cpp similarity index 100% rename from esphome/components/optolink/optolink_device_info_sensor.cpp rename to esphome/components/optolink/text_sensor/optolink_device_info_sensor.cpp diff --git a/esphome/components/optolink/optolink_device_info_sensor.h b/esphome/components/optolink/text_sensor/optolink_device_info_sensor.h similarity index 92% rename from esphome/components/optolink/optolink_device_info_sensor.h rename to esphome/components/optolink/text_sensor/optolink_device_info_sensor.h index 94ace35a25..73ce0cc326 100644 --- a/esphome/components/optolink/optolink_device_info_sensor.h +++ b/esphome/components/optolink/text_sensor/optolink_device_info_sensor.h @@ -3,8 +3,8 @@ #ifdef USE_ARDUINO #include "esphome/components/text_sensor/text_sensor.h" -#include "optolink.h" -#include "optolink_sensor_base.h" +#include "../optolink.h" +#include "../optolink_sensor_base.h" #include "VitoWiFi.h" namespace esphome { diff --git a/esphome/components/optolink/optolink_state_sensor.h b/esphome/components/optolink/text_sensor/optolink_state_sensor.h similarity index 91% rename from esphome/components/optolink/optolink_state_sensor.h rename to esphome/components/optolink/text_sensor/optolink_state_sensor.h index 9652bf2c61..0d67602b68 100644 --- a/esphome/components/optolink/optolink_state_sensor.h +++ b/esphome/components/optolink/text_sensor/optolink_state_sensor.h @@ -3,8 +3,8 @@ #ifdef USE_ARDUINO #include "esphome/components/text_sensor/text_sensor.h" -#include "optolink.h" -#include "optolink_sensor_base.h" +#include "../optolink.h" +#include "../optolink_sensor_base.h" #include "VitoWiFi.h" namespace esphome { diff --git a/esphome/components/optolink/optolink_text_sensor.cpp b/esphome/components/optolink/text_sensor/optolink_text_sensor.cpp similarity index 98% rename from esphome/components/optolink/optolink_text_sensor.cpp rename to esphome/components/optolink/text_sensor/optolink_text_sensor.cpp index f3e096684f..bbc18973cb 100644 --- a/esphome/components/optolink/optolink_text_sensor.cpp +++ b/esphome/components/optolink/text_sensor/optolink_text_sensor.cpp @@ -1,7 +1,7 @@ #ifdef USE_ARDUINO #include "optolink_text_sensor.h" -#include "optolink.h" +#include "../optolink.h" #include "VitoWiFi.h" namespace esphome { diff --git a/esphome/components/optolink/optolink_text_sensor.h b/esphome/components/optolink/text_sensor/optolink_text_sensor.h similarity index 93% rename from esphome/components/optolink/optolink_text_sensor.h rename to esphome/components/optolink/text_sensor/optolink_text_sensor.h index fd6a64a60e..21a0f3ea10 100644 --- a/esphome/components/optolink/optolink_text_sensor.h +++ b/esphome/components/optolink/text_sensor/optolink_text_sensor.h @@ -3,8 +3,8 @@ #ifdef USE_ARDUINO #include "esphome/components/text_sensor/text_sensor.h" -#include "optolink.h" -#include "optolink_sensor_base.h" +#include "../optolink.h" +#include "../optolink_sensor_base.h" #include "VitoWiFi.h" namespace esphome {