mirror of
https://github.com/esphome/esphome.git
synced 2024-12-11 14:49:20 +01:00
small error correction in init.py
This commit is contained in:
parent
c04d029f48
commit
3c9b6e29dc
@ -8,10 +8,10 @@ DEPENDENCIES = ["i2c"]
|
||||
|
||||
MULTI_CONF = True
|
||||
|
||||
CONF_M5STACK_4RELAY_ID = "m5stack4relay_id"
|
||||
CONF_M5STACK_4RELAY_ID = "m5stack_4relay_id"
|
||||
|
||||
m5stack_4relay_ns = cg.esphome_ns.namespace("m5stack_4relay")
|
||||
M5Stack_4Relay = m5stack4relay_ns.class_("M5Stack_4Relay", cg.Component, i2c.I2CDevice)
|
||||
M5Stack_4Relay = m5stack_4relay_ns.class_("M5Stack_4Relay", cg.Component, i2c.I2CDevice)
|
||||
|
||||
CONFIG_SCHEMA = (
|
||||
cv.Schema(
|
||||
|
@ -1,7 +1,7 @@
|
||||
import esphome.codegen as cg
|
||||
import esphome.config_validation as cv
|
||||
from esphome.components import i2c, switch
|
||||
from esphome.const import CONF_CHANNEL, CONF_INTERLOCK # , CONF_ID,
|
||||
from esphome.const import CONF_CHANNEL
|
||||
|
||||
from .. import m5stack_4relay_ns, M5Stack_4Relay, CONF_M5STACK_4RELAY_ID
|
||||
|
||||
@ -32,4 +32,3 @@ async def to_code(config):
|
||||
await cg.register_parented(var, config[CONF_M5STACK_4RELAY_ID])
|
||||
|
||||
cg.add(var.set_channel(config[CONF_CHANNEL]))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user