From 3c9b6e29dcc1694c32b0a8a230719da2370a402a Mon Sep 17 00:00:00 2001 From: KoenBreeman <121864590+KoenBreeman@users.noreply.github.com> Date: Fri, 16 Aug 2024 10:49:45 +0200 Subject: [PATCH] small error correction in init.py --- esphome/components/m5stack_4relay/__init__.py | 4 ++-- esphome/components/m5stack_4relay/switch/__init__.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/esphome/components/m5stack_4relay/__init__.py b/esphome/components/m5stack_4relay/__init__.py index ef6e429b27..4e712570f3 100644 --- a/esphome/components/m5stack_4relay/__init__.py +++ b/esphome/components/m5stack_4relay/__init__.py @@ -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( diff --git a/esphome/components/m5stack_4relay/switch/__init__.py b/esphome/components/m5stack_4relay/switch/__init__.py index c79b9055fd..209ef44bc2 100644 --- a/esphome/components/m5stack_4relay/switch/__init__.py +++ b/esphome/components/m5stack_4relay/switch/__init__.py @@ -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])) -