Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
AzonInc committed Sep 18, 2024
1 parent a714003 commit 79b82d2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
24 changes: 10 additions & 14 deletions components/tc_bus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,21 +193,17 @@ async def tc_bus_send_to_code(config, action_id, template_args, args):

return var


TC_BUS_PROGRAMMING_MODE_SCHEMA = cv.All(
cv.Schema(
{
cv.GenerateID(): cv.use_id(TCBus),
cv.Required(CONF_PROGRAMMING_MODE): cv.templatable(cv.boolean)
}),
validate
)

@automation.register_action(
"tc_bus.set_programming_mode",
TCBusProgrammingModeAction,
TC_BUS_PROGRAMMING_MODE_SCHEMA
automation.maybe_simple_id(
{
cv.GenerateID(): cv.use_id(TCBus),
cv.Required(CONF_PROGRAMMING_MODE): cv.templatable(cv.boolean)
}
),
)
async def tc_bus_set_programming_mode_to_code(config, action_id, template_arg, args):
paren = await cg.get_variable(config[CONF_ID])
return cg.new_Pvariable(action_id, template_arg, paren)
async def tc_bus_set_programming_mode_to_code(config, action_id, template_args, args):
parent = await cg.get_variable(config[CONF_ID])
var = cg.new_Pvariable(action_id, template_args, parent)
return var
1 change: 0 additions & 1 deletion components/tc_bus/tc_bus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,6 @@ namespace esphome

void TCBusComponent::set_programming_mode(bool enabled)
{
ESP_LOGD(TAG, "Programming Mode active: %s", YESNO(enabled));
send_command(enabled ? 0x5041 : 0x5040);
}

Expand Down

0 comments on commit 79b82d2

Please sign in to comment.