1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-11 07:42:26 +01:00
Files
esphome/esphome/components/wifi_signal/wifi_signal_sensor.h
J. Nick Koston 34c100e997 Remove legacy unique_id field from entities
These are no longer used in Home Assistant. This will be a breaking
change for MQTT for the sensors that defined custom unique ids.
2025-06-07 22:17:07 -05:00

22 lines
596 B
C++

#pragma once
#include "esphome/core/component.h"
#include "esphome/core/helpers.h"
#include "esphome/components/sensor/sensor.h"
#include "esphome/components/wifi/wifi_component.h"
#ifdef USE_WIFI
namespace esphome {
namespace wifi_signal {
class WiFiSignalSensor : public sensor::Sensor, public PollingComponent {
public:
void update() override { this->publish_state(wifi::global_wifi_component->wifi_rssi()); }
void dump_config() override;
float get_setup_priority() const override { return setup_priority::AFTER_WIFI; }
};
} // namespace wifi_signal
} // namespace esphome
#endif