From fce151a128624b85e3dd37af1d60681a7f0b8cd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20Koek?= Date: Thu, 1 Feb 2024 16:07:45 +0000 Subject: [PATCH] no need to be pulling --- esphome/components/ebyte_lora_e220/__init__.py | 2 +- esphome/components/ebyte_lora_e220/ebyte_lora_e220.h | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/esphome/components/ebyte_lora_e220/__init__.py b/esphome/components/ebyte_lora_e220/__init__.py index 62178a8b6e..07d4454f1a 100644 --- a/esphome/components/ebyte_lora_e220/__init__.py +++ b/esphome/components/ebyte_lora_e220/__init__.py @@ -26,7 +26,7 @@ CONFIG_SCHEMA = cv.Schema({ cv.Optional(CONF_LORA_RSSI): sensor.sensor_schema(device_class=DEVICE_CLASS_SIGNAL_STRENGTH,unit_of_measurement=UNIT_DECIBEL_MILLIWATT,accuracy_decimals=0,state_class=STATE_CLASS_MEASUREMENT).extend(), -}).extend(cv.polling_component_schema('60s')).extend(uart.UART_DEVICE_SCHEMA) +}).extend(uart.UART_DEVICE_SCHEMA) async def to_code(config): var = cg.new_Pvariable(config[CONF_ID]) diff --git a/esphome/components/ebyte_lora_e220/ebyte_lora_e220.h b/esphome/components/ebyte_lora_e220/ebyte_lora_e220.h index 1d5da38a14..22f3a24c18 100644 --- a/esphome/components/ebyte_lora_e220/ebyte_lora_e220.h +++ b/esphome/components/ebyte_lora_e220/ebyte_lora_e220.h @@ -26,17 +26,18 @@ enum MODE_TYPE { MODE_3_SLEEP = 3, MODE_INIT = 0xFF }; -class EbyteLoraE220 : public PollingComponent, public uart::UARTDevice { +class EbyteLoraE220 : public Component, public uart::UARTDevice { public: + void setup() override; + void loop() override; + void dump_config() override; + // local void set_message_sensor(text_sensor::TextSensor *s) { message_text_sensor = s; } void set_status_sensor(text_sensor::TextSensor *s) { status_text_sensor = s; } void set_rssi_sensor(sensor::Sensor *s) { rssi_sensor = s; } void set_pin_aux(GPIOPin *s) { pin_aux = s; } void set_pin_m0(GPIOPin *s) { pin_m0 = s; } void set_pin_m1(GPIOPin *s) { pin_m1 = s; } - void setup() override; - void dump_config() override; - void loop() override; private: MODE_TYPE mode = MODE_0_NORMAL;