update priority

This commit is contained in:
oarcher 2024-08-16 17:41:48 +02:00
parent d164ccd12a
commit 352111b556
5 changed files with 5 additions and 4 deletions

View file

@ -131,7 +131,7 @@ std::string get_signal_bars(float rssi, bool color) {
if (!color) {
if (std::isnan(rssi)) {
return {};
return "None";
} else if (rssi >= -50) {
return "High";
} else if (rssi >= -65) {

View file

@ -141,7 +141,7 @@ void ModemSensor::update_gnss_sensors_() {
std::map<std::string, std::string> parts;
auto at_command_result = global_modem_component->send_at("AT+CGNSSINFO");
if (at_command_result) {
std::string gnss_info = at_command_result.result;
std::string gnss_info = at_command_result.output;
parts = get_gnssinfo_tokens(gnss_info);
}

View file

@ -28,7 +28,7 @@ class ModemSensor : 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 {}

View file

@ -20,7 +20,7 @@ class GnssSwitch : public switch_::Switch, public Component {
// ========== 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 dump_config() override;
void setup() override;
void loop() override;

View file

@ -26,6 +26,7 @@ CONFIG_SCHEMA = cv.All(
),
cv.Optional(CONF_SIGNAL_STRENGTH): text_sensor.text_sensor_schema(
device_class=DEVICE_CLASS_EMPTY,
icon="mdi:signal",
),
}
)