Add dynalite level preset (#37533)

* implementation of "level" in preset

* updated library version - bug fix for covers during init with active=on

* cleanup after merge
This commit is contained in:
Ziv 2020-08-12 16:18:26 +03:00 committed by GitHub
parent 7949357180
commit d058802325
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 1 deletions

View file

@ -33,6 +33,7 @@ from .const import (
CONF_DEVICE_CLASS,
CONF_DURATION,
CONF_FADE,
CONF_LEVEL,
CONF_NO_DEFAULT,
CONF_OPEN_PRESET,
CONF_POLL_TIMER,
@ -75,7 +76,11 @@ CHANNEL_DATA_SCHEMA = vol.Schema(
CHANNEL_SCHEMA = vol.Schema({num_string: CHANNEL_DATA_SCHEMA})
PRESET_DATA_SCHEMA = vol.Schema(
{vol.Optional(CONF_NAME): cv.string, vol.Optional(CONF_FADE): vol.Coerce(float)}
{
vol.Optional(CONF_NAME): cv.string,
vol.Optional(CONF_FADE): vol.Coerce(float),
vol.Optional(CONF_LEVEL): vol.Coerce(float),
}
)
PRESET_SCHEMA = vol.Schema({num_string: vol.Any(PRESET_DATA_SCHEMA, None)})