From def2be4b83ffe2e04a9c4b93c7117612b536f127 Mon Sep 17 00:00:00 2001 From: oarcher Date: Fri, 16 Aug 2024 17:44:09 +0200 Subject: [PATCH] fix text sensor bad pointer --- esphome/components/modem/text_sensor/modem_text_sensor.cpp | 2 +- esphome/components/modem/text_sensor/modem_text_sensor.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/modem/text_sensor/modem_text_sensor.cpp b/esphome/components/modem/text_sensor/modem_text_sensor.cpp index 4c15609e0e..537902cb0f 100644 --- a/esphome/components/modem/text_sensor/modem_text_sensor.cpp +++ b/esphome/components/modem/text_sensor/modem_text_sensor.cpp @@ -55,7 +55,7 @@ void ModemTextSensor::update_network_type_text_sensor_() { } void ModemTextSensor::update_signal_strength_text_sensor_() { - if (modem::global_modem_component->modem_ready() && this->network_type_text_sensor_) { + if (modem::global_modem_component->modem_ready() && this->signal_strength_text_sensor_) { float rssi, ber; if (modem::global_modem_component->get_signal_quality(rssi, ber)) { std::string bars = get_signal_bars(rssi, false); diff --git a/esphome/components/modem/text_sensor/modem_text_sensor.h b/esphome/components/modem/text_sensor/modem_text_sensor.h index 44013a89ce..f78f2ea22e 100644 --- a/esphome/components/modem/text_sensor/modem_text_sensor.h +++ b/esphome/components/modem/text_sensor/modem_text_sensor.h @@ -24,7 +24,7 @@ class ModemTextSensor : public PollingComponent { // ========== INTERNAL METHODS ========== // (In most use cases you won't need these) - float get_setup_priority() const override { return setup_priority::AFTER_WIFI; } + float get_setup_priority() const override { return setup_priority::AFTER_CONNECTION; } void setup() override; void update() override; void dump_config() override {}