mirror of
https://github.com/esphome/esphome.git
synced 2024-12-04 04:28:19 +01:00
Lint fixes
This commit is contained in:
parent
9c6b450e4c
commit
c9a098ba0f
1 changed files with 3 additions and 1 deletions
|
@ -26,6 +26,7 @@ ES8388_PRESETS = {
|
||||||
"raspiaudio_radio": Presets.RASPIAUDIO_RADIO,
|
"raspiaudio_radio": Presets.RASPIAUDIO_RADIO,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def validate_instruction_list():
|
def validate_instruction_list():
|
||||||
return cv.ensure_list(
|
return cv.ensure_list(
|
||||||
cv.Length(min=2, max=2),
|
cv.Length(min=2, max=2),
|
||||||
|
@ -64,6 +65,7 @@ async def to_code(config):
|
||||||
})
|
})
|
||||||
cg.add(var.register_macro(macro[CONF_ID], macro[CONF_INSTRUCTIONS]))
|
cg.add(var.register_macro(macro[CONF_ID], macro[CONF_INSTRUCTIONS]))
|
||||||
|
|
||||||
|
|
||||||
@automation.register_action(
|
@automation.register_action(
|
||||||
"es8388.execute_macro",
|
"es8388.execute_macro",
|
||||||
MacroAction,
|
MacroAction,
|
||||||
|
@ -79,4 +81,4 @@ async def execute_macro_to_code(config, action_id, template_arg, args):
|
||||||
await cg.register_parented(var, config[CONF_ES8388_ID])
|
await cg.register_parented(var, config[CONF_ES8388_ID])
|
||||||
|
|
||||||
cg.add(var.set_macro_id(config[CONF_ID]))
|
cg.add(var.set_macro_id(config[CONF_ID]))
|
||||||
return var
|
return var
|
||||||
|
|
Loading…
Reference in a new issue