mirror of
https://github.com/esphome/esphome.git
synced 2024-11-28 09:44:12 +01:00
no need to be pulling
This commit is contained in:
parent
a0716fd8bf
commit
fce151a128
2 changed files with 6 additions and 5 deletions
|
@ -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])
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue