component source directory structure refactored

This commit is contained in:
j0ta29 2023-08-26 18:48:36 +00:00
parent f1df196687
commit 878e7c93a3
19 changed files with 26 additions and 29 deletions

View file

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

View file

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

View file

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

View file

@ -1,7 +1,7 @@
#ifdef USE_ARDUINO
#include "optolink_number.h"
#include "optolink.h"
#include "../optolink.h"
#include "VitoWiFi.h"
namespace esphome {

View file

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

View file

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

View file

@ -1,7 +1,7 @@
#ifdef USE_ARDUINO
#include "optolink_select.h"
#include "optolink.h"
#include "../optolink.h"
#include "VitoWiFi.h"
namespace esphome {

View file

@ -4,8 +4,8 @@
#include <map>
#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 {

View file

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

View file

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

View file

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

View file

@ -1,7 +1,7 @@
#ifdef USE_ARDUINO
#include "optolink_switch.h"
#include "optolink.h"
#include "../optolink.h"
#include "VitoWiFi.h"
namespace esphome {

View file

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

View file

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

View file

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

View file

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

View file

@ -1,7 +1,7 @@
#ifdef USE_ARDUINO
#include "optolink_text_sensor.h"
#include "optolink.h"
#include "../optolink.h"
#include "VitoWiFi.h"
namespace esphome {

View file

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