mirror of
https://github.com/esphome/esphome.git
synced 2024-11-24 07:58:09 +01:00
get rid of most AUTOLOADs in optolink component
This commit is contained in:
parent
a14acb4a16
commit
a8ed21ae74
9 changed files with 25 additions and 5 deletions
|
@ -17,8 +17,8 @@ from esphome.const import (
|
|||
from esphome.core import CORE
|
||||
|
||||
CODEOWNERS = ["@j0ta29"]
|
||||
DEPENDENCIES = []
|
||||
AUTO_LOAD = ["sensor", "binary_sensor", "text_sensor", "number", "select", "switch"]
|
||||
DEPENDENCIES = ["text_sensor"]
|
||||
AUTO_LOAD = []
|
||||
MULTI_CONF = False
|
||||
CONF_DEVICE_INFO = "device_info"
|
||||
|
||||
|
|
|
@ -3,6 +3,10 @@ from esphome.components import binary_sensor
|
|||
from esphome.const import CONF_ADDRESS, CONF_ID
|
||||
from .. import SENSOR_BASE_SCHEMA, optolink_ns, CONF_OPTOLINK_ID
|
||||
|
||||
DEPENDENCIES = ["optolink"]
|
||||
CODEOWNERS = ["@j0ta29"]
|
||||
|
||||
|
||||
OptolinkBinarySensor = optolink_ns.class_(
|
||||
"OptolinkBinarySensor", binary_sensor.BinarySensor, cg.PollingComponent
|
||||
)
|
||||
|
|
|
@ -12,6 +12,10 @@ from esphome.const import (
|
|||
)
|
||||
from .. import optolink_ns, CONF_OPTOLINK_ID, SENSOR_BASE_SCHEMA
|
||||
|
||||
|
||||
DEPENDENCIES = ["optolink"]
|
||||
CODEOWNERS = ["@j0ta29"]
|
||||
|
||||
OptolinkNumber = optolink_ns.class_(
|
||||
"OptolinkNumber", number.Number, cg.PollingComponent
|
||||
)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#ifdef USE_ARDUINO
|
||||
|
||||
#include "esphome/core/defines.h"
|
||||
#include "esphome/core/log.h"
|
||||
#include "optolink.h"
|
||||
#include "VitoWiFi.h"
|
||||
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
#ifdef USE_ARDUINO
|
||||
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
#include "esphome/components/binary_sensor/binary_sensor.h"
|
||||
#include "esphome/components/text_sensor/text_sensor.h"
|
||||
#include "VitoWiFi.h"
|
||||
|
||||
|
|
|
@ -11,6 +11,10 @@ from esphome.const import (
|
|||
)
|
||||
from .. import optolink_ns, CONF_OPTOLINK_ID, SENSOR_BASE_SCHEMA
|
||||
|
||||
DEPENDENCIES = ["optolink"]
|
||||
CODEOWNERS = ["@j0ta29"]
|
||||
|
||||
|
||||
OptolinkSelect = optolink_ns.class_(
|
||||
"OptolinkSelect", select.Select, cg.PollingComponent
|
||||
)
|
||||
|
|
|
@ -9,6 +9,10 @@ from esphome.const import (
|
|||
)
|
||||
from .. import CONF_OPTOLINK_ID, SENSOR_BASE_SCHEMA, optolink_ns
|
||||
|
||||
DEPENDENCIES = ["optolink"]
|
||||
CODEOWNERS = ["@j0ta29"]
|
||||
|
||||
|
||||
OptolinkSensor = optolink_ns.class_(
|
||||
"OptolinkSensor", sensor.Sensor, cg.PollingComponent
|
||||
)
|
||||
|
|
|
@ -5,6 +5,10 @@ from esphome.components import switch
|
|||
from esphome.const import CONF_ADDRESS, CONF_ID, CONF_UPDATE_INTERVAL
|
||||
from .. import OptolinkComponent, optolink_ns
|
||||
|
||||
DEPENDENCIES = ["optolink"]
|
||||
CODEOWNERS = ["@j0ta29"]
|
||||
|
||||
|
||||
OptolinkSwitch = optolink_ns.class_(
|
||||
"OptolinkSwitch", switch.Switch, cg.PollingComponent
|
||||
)
|
||||
|
|
|
@ -11,7 +11,8 @@ from esphome.const import (
|
|||
)
|
||||
from .. import optolink_ns, CONF_OPTOLINK_ID, SENSOR_BASE_SCHEMA
|
||||
|
||||
DEPENDENCIES = ["api"]
|
||||
DEPENDENCIES = ["optolink", "api"]
|
||||
CODEOWNERS = ["@j0ta29"]
|
||||
|
||||
TextSensorMode = optolink_ns.enum("TextSensorMode")
|
||||
MODE = {
|
||||
|
|
Loading…
Reference in a new issue