fix text sensor bad pointer

This commit is contained in:
oarcher 2024-08-16 17:44:09 +02:00
parent 6cbd2af6b4
commit def2be4b83
2 changed files with 2 additions and 2 deletions

View file

@ -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);

View file

@ -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 {}