mirror of
https://github.com/esphome/esphome.git
synced 2026-09-18 02:28:42 +00:00
[mqtt_subscribe] Move set_qos into the headers (#19282)
This commit is contained in:
@@ -25,7 +25,6 @@ void MQTTSubscribeSensor::setup() {
|
||||
}
|
||||
|
||||
float MQTTSubscribeSensor::get_setup_priority() const { return setup_priority::AFTER_CONNECTION; }
|
||||
void MQTTSubscribeSensor::set_qos(uint8_t qos) { this->qos_ = qos; }
|
||||
void MQTTSubscribeSensor::dump_config() {
|
||||
LOG_SENSOR("", "MQTT Subscribe", this);
|
||||
ESP_LOGCONFIG(TAG, " Topic: %s", this->topic_.c_str());
|
||||
|
||||
@@ -18,7 +18,7 @@ class MQTTSubscribeSensor final : public sensor::Sensor, public Component {
|
||||
void dump_config() override;
|
||||
float get_setup_priority() const override;
|
||||
|
||||
void set_qos(uint8_t qos);
|
||||
void set_qos(uint8_t qos) { this->qos_ = qos; }
|
||||
|
||||
protected:
|
||||
mqtt::MQTTClientComponent *parent_;
|
||||
|
||||
@@ -15,7 +15,6 @@ void MQTTSubscribeTextSensor::setup() {
|
||||
this->qos_);
|
||||
}
|
||||
float MQTTSubscribeTextSensor::get_setup_priority() const { return setup_priority::AFTER_CONNECTION; }
|
||||
void MQTTSubscribeTextSensor::set_qos(uint8_t qos) { this->qos_ = qos; }
|
||||
void MQTTSubscribeTextSensor::dump_config() {
|
||||
LOG_TEXT_SENSOR("", "MQTT Subscribe Text Sensor", this);
|
||||
ESP_LOGCONFIG(TAG, " Topic: %s", this->topic_.c_str());
|
||||
|
||||
@@ -17,7 +17,7 @@ class MQTTSubscribeTextSensor final : public text_sensor::TextSensor, public Com
|
||||
void setup() override;
|
||||
void dump_config() override;
|
||||
float get_setup_priority() const override;
|
||||
void set_qos(uint8_t qos);
|
||||
void set_qos(uint8_t qos) { this->qos_ = qos; }
|
||||
|
||||
protected:
|
||||
mqtt::MQTTClientComponent *parent_;
|
||||
|
||||
Reference in New Issue
Block a user