ESPHome 2025.9.0-dev
Loading...
Searching...
No Matches
wifi_signal_sensor.h
Go to the documentation of this file.
1#pragma once
2
7#ifdef USE_WIFI
8namespace esphome {
9namespace wifi_signal {
10
12 public:
13 void update() override { this->publish_state(wifi::global_wifi_component->wifi_rssi()); }
14 void dump_config() override;
15
16 float get_setup_priority() const override { return setup_priority::AFTER_WIFI; }
17};
18
19} // namespace wifi_signal
20} // namespace esphome
21#endif
This class simplifies creating components that periodically check a state.
Definition component.h:425
Base-class for all sensors.
Definition sensor.h:59
void publish_state(float state)
Publish a new state to the front-end.
Definition sensor.cpp:45
const float AFTER_WIFI
For components that should be initialized after WiFi is connected.
Definition component.cpp:57
WiFiComponent * global_wifi_component
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7