mirror of
https://github.com/esphome/esphome.git
synced 2024-11-22 23:18:10 +01:00
Allow gamma correction in light partition (#485)
This commit is contained in:
parent
477311dac6
commit
386cd4f35f
1 changed files with 3 additions and 2 deletions
|
@ -3,8 +3,8 @@ import voluptuous as vol
|
|||
from esphome.components import light
|
||||
from esphome.components.light import AddressableLight
|
||||
import esphome.config_validation as cv
|
||||
from esphome.const import CONF_DEFAULT_TRANSITION_LENGTH, CONF_EFFECTS, CONF_FROM, CONF_ID, \
|
||||
CONF_MAKE_ID, CONF_NAME, CONF_SEGMENTS, CONF_TO
|
||||
from esphome.const import CONF_DEFAULT_TRANSITION_LENGTH, CONF_EFFECTS, CONF_FROM, \
|
||||
CONF_GAMMA_CORRECT, CONF_ID, CONF_MAKE_ID, CONF_NAME, CONF_SEGMENTS, CONF_TO
|
||||
from esphome.cpp_generator import get_variable, variable
|
||||
from esphome.cpp_types import App, Application
|
||||
|
||||
|
@ -30,6 +30,7 @@ PLATFORM_SCHEMA = cv.nameable(light.LIGHT_PLATFORM_SCHEMA.extend({
|
|||
vol.Required(CONF_TO): cv.positive_int,
|
||||
}, validate_from_to), vol.Length(min=1)),
|
||||
|
||||
vol.Optional(CONF_GAMMA_CORRECT): cv.positive_float,
|
||||
vol.Optional(CONF_DEFAULT_TRANSITION_LENGTH): cv.positive_time_period_milliseconds,
|
||||
vol.Optional(CONF_EFFECTS): light.validate_effects(light.ADDRESSABLE_EFFECTS),
|
||||
}))
|
||||
|
|
Loading…
Reference in a new issue