diff --git a/__init__.py b/__init__.py index e69de29..00c85c7 100644 --- a/__init__.py +++ b/__init__.py @@ -0,0 +1 @@ +CODEOWNERS = ["@mmakaay"] diff --git a/light.py b/light/__init__.py similarity index 97% rename from light.py rename to light/__init__.py index 3c91d84..a004859 100644 --- a/light.py +++ b/light/__init__.py @@ -7,8 +7,6 @@ from esphome.const import CONF_RED, CONF_GREEN, CONF_BLUE, CONF_WHITE, CONF_OUTP CONF_MASTER1 = "master1" CONF_MASTER2 = "master2" -CODEOWNERS = ["@mmakaay"] - yeelight_ns = cg.esphome_ns.namespace("yeelight") bs2_ns = yeelight_ns.namespace("bs2") light_state = bs2_ns.class_("YeelightBS2LightState", cg.Nameable, cg.Component) @@ -25,7 +23,7 @@ CONFIG_SCHEMA = light.RGB_LIGHT_SCHEMA.extend({ cv.Required(CONF_MASTER1): cv.use_id(gpio_output.GPIOBinaryOutput), cv.Required(CONF_MASTER2): cv.use_id(gpio_output.GPIOBinaryOutput), }) -import json; + def to_code(config): var = cg.new_Pvariable(config[CONF_OUTPUT_ID]) yield light.register_light(var, config) diff --git a/color_instant_handler.h b/light/color_instant_handler.h similarity index 100% rename from color_instant_handler.h rename to light/color_instant_handler.h diff --git a/color_night_light.h b/light/color_night_light.h similarity index 100% rename from color_night_light.h rename to light/color_night_light.h diff --git a/color_off.h b/light/color_off.h similarity index 100% rename from color_off.h rename to light/color_off.h diff --git a/color_rgb_light.h b/light/color_rgb_light.h similarity index 100% rename from color_rgb_light.h rename to light/color_rgb_light.h diff --git a/color_transition_handler.h b/light/color_transition_handler.h similarity index 100% rename from color_transition_handler.h rename to light/color_transition_handler.h diff --git a/color_white_light.h b/light/color_white_light.h similarity index 100% rename from color_white_light.h rename to light/color_white_light.h diff --git a/common.h b/light/common.h similarity index 100% rename from common.h rename to light/common.h diff --git a/gpio_outputs.h b/light/gpio_outputs.h similarity index 100% rename from gpio_outputs.h rename to light/gpio_outputs.h diff --git a/light.h b/light/light.h similarity index 100% rename from light.h rename to light/light.h