From c4031bef74c0803ef2d6ac373465624f64ba5a26 Mon Sep 17 00:00:00 2001 From: Guido Schreuder Date: Sun, 10 Mar 2024 21:22:19 +0100 Subject: [PATCH] codestyle --- esphome/components/ebus/__init__.py | 2 +- esphome/components/ebus/ebus_component.h | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/esphome/components/ebus/__init__.py b/esphome/components/ebus/__init__.py index 687accb9d2..50a3cd0387 100644 --- a/esphome/components/ebus/__init__.py +++ b/esphome/components/ebus/__init__.py @@ -128,7 +128,7 @@ async def to_code(config): def item_config(ebus, item, config): cg.add(item.set_parent(ebus)) - cg.add(ebus.add_item(item)), + cg.add(ebus.add_item(item)) cg.add(item.set_send_poll(config[CONF_TELEGRAM][CONF_SEND_POLL])) if CONF_ADDRESS in config[CONF_TELEGRAM]: cg.add(item.set_address(config[CONF_TELEGRAM][CONF_ADDRESS])) diff --git a/esphome/components/ebus/ebus_component.h b/esphome/components/ebus/ebus_component.h index 4d11f3c70b..d689e83a6a 100644 --- a/esphome/components/ebus/ebus_component.h +++ b/esphome/components/ebus/ebus_component.h @@ -31,7 +31,7 @@ class EbusItem : public Component { void set_payload(const std::vector &payload) { this->payload_ = payload; } void set_response_read_position(uint8_t response_position) { this->response_position_ = response_position; } - virtual void process_received(Telegram) { } + virtual void process_received(Telegram) {} virtual std::vector reply(Telegram telegram) { std::vector reply = {0xe3, 'E', 'S', 'P', 'H', 'M', 0x12, 0x34, 0x56, 0x78}; return reply; @@ -68,9 +68,7 @@ class EbusComponent : public PollingComponent { void set_history_queue_size(uint8_t /*history_queue_size*/); void set_command_queue_size(uint8_t /*command_queue_size*/); - void add_item(EbusItem *item) { - this->items_.push_back(item); - }; + void add_item(EbusItem *item) { this->items_.push_back(item); }; void update() override;