mirror of
https://github.com/esphome/esphome.git
synced 2024-11-09 16:57:47 +01:00
Oh ffs
This commit is contained in:
parent
68a1b6bc02
commit
8aff0e7bfe
1 changed files with 14 additions and 12 deletions
|
@ -31,17 +31,19 @@ def validate_instruction_list():
|
|||
|
||||
|
||||
CONFIG_SCHEMA = (
|
||||
cv.Schema({
|
||||
cv.GenerateID(): cv.declare_id(ES8388Component),
|
||||
cv.Optional(CONF_PRESET): cv.enum(ES8388_PRESETS, lower=True),
|
||||
cv.Optional(CONF_INIT_INSTRUCTIONS): validate_instruction_list(),
|
||||
cv.Optional(CONF_MACROS): cv.ensure_list(
|
||||
{
|
||||
cv.Required(CONF_ID): cv.string,
|
||||
cv.Required(CONF_INSTRUCTIONS): validate_instruction_list(),
|
||||
}
|
||||
),
|
||||
})
|
||||
cv.Schema(
|
||||
{
|
||||
cv.GenerateID(): cv.declare_id(ES8388Component),
|
||||
cv.Optional(CONF_PRESET): cv.enum(ES8388_PRESETS, lower=True),
|
||||
cv.Optional(CONF_INIT_INSTRUCTIONS): validate_instruction_list(),
|
||||
cv.Optional(CONF_MACROS): cv.ensure_list(
|
||||
{
|
||||
cv.Required(CONF_ID): cv.string,
|
||||
cv.Required(CONF_INSTRUCTIONS): validate_instruction_list(),
|
||||
}
|
||||
),
|
||||
}
|
||||
)
|
||||
.extend(i2c.i2c_device_schema(0x10))
|
||||
.extend(cv.COMPONENT_SCHEMA)
|
||||
)
|
||||
|
@ -63,7 +65,7 @@ async def to_code(config):
|
|||
{
|
||||
cv.Required(CONF_ID): cv.declare_id(Macro),
|
||||
cv.Required(CONF_INSTRUCTIONS): validate_instruction_list(),
|
||||
}
|
||||
},
|
||||
)
|
||||
cg.add(var.register_macro(macro[CONF_ID], macro[CONF_INSTRUCTIONS]))
|
||||
|
||||
|
|
Loading…
Reference in a new issue