From 2b2b385dbd3b5ccf17a046b16d67284cad8f13d2 Mon Sep 17 00:00:00 2001 From: tetele Date: Fri, 21 Jun 2024 12:58:44 +0300 Subject: [PATCH] Fix mixed IDs --- esphome/components/es8388/__init__.py | 2 +- esphome/components/es8388/es8388_component.h | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/esphome/components/es8388/__init__.py b/esphome/components/es8388/__init__.py index cc6ab767e5..1f39aed9df 100644 --- a/esphome/components/es8388/__init__.py +++ b/esphome/components/es8388/__init__.py @@ -78,5 +78,5 @@ async def execute_macro_to_code(config, action_id, template_arg, args): var = cg.new_Pvariable(action_id, template_arg) await cg.register_parented(var, config[CONF_ES8388_ID]) - cg.add(var.set_id(config[CONF_ID])) + cg.add(var.set_macro_id(config[CONF_ID])) return var \ No newline at end of file diff --git a/esphome/components/es8388/es8388_component.h b/esphome/components/es8388/es8388_component.h index 4fc57ee5e9..0549611dad 100644 --- a/esphome/components/es8388/es8388_component.h +++ b/esphome/components/es8388/es8388_component.h @@ -52,19 +52,11 @@ class ES8388Component : public Component, public i2c::I2CDevice { template class ES8388MacroAction : public Action, public Parented { public: - // TEMPLATABLE_VALUE(int8_t, hw_frontend_reset) TEMPLATABLE_VALUE(std::string, macro_id) - // TEMPLATABLE_VALUE(int, sensing_distance) - // TEMPLATABLE_VALUE(int, poweron_selfcheck_time) - // TEMPLATABLE_VALUE(int, power_consumption) - // TEMPLATABLE_VALUE(int, protect_time) - // TEMPLATABLE_VALUE(int, trigger_base) - // TEMPLATABLE_VALUE(int, trigger_keep) - // TEMPLATABLE_VALUE(int, stage_gain) void play(Ts... x) { if (this->macro_id_.has_value()) { - std::string macro_id = this->macro_.value(x...); + std::string macro_id = this->macro_id_.value(x...); this->parent_->execute_macro(macro_id); } }