Browse Source

Moved the finished light component into its own subdirectory to keep things clean when implementing other components.

pull/3/head
Maurice Makaay 3 years ago
parent
commit
edcadc146c
11 changed files with 2 additions and 3 deletions
  1. +1
    -0
      __init__.py
  2. +1
    -3
      light/__init__.py
  3. +0
    -0
      light/color_instant_handler.h
  4. +0
    -0
      light/color_night_light.h
  5. +0
    -0
      light/color_off.h
  6. +0
    -0
      light/color_rgb_light.h
  7. +0
    -0
      light/color_transition_handler.h
  8. +0
    -0
      light/color_white_light.h
  9. +0
    -0
      light/common.h
  10. +0
    -0
      light/gpio_outputs.h
  11. +0
    -0
      light/light.h

+ 1
- 0
__init__.py View File

@ -0,0 +1 @@
CODEOWNERS = ["@mmakaay"]

light.py → light/__init__.py View File

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

color_instant_handler.h → light/color_instant_handler.h View File


color_night_light.h → light/color_night_light.h View File


color_off.h → light/color_off.h View File


color_rgb_light.h → light/color_rgb_light.h View File


color_transition_handler.h → light/color_transition_handler.h View File


color_white_light.h → light/color_white_light.h View File


common.h → light/common.h View File


gpio_outputs.h → light/gpio_outputs.h View File


light.h → light/light.h View File


Loading…
Cancel
Save