mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 17:27:59 +01:00
update priority
This commit is contained in:
parent
d164ccd12a
commit
352111b556
5 changed files with 5 additions and 4 deletions
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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",
|
||||
),
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue