From 220a14e1f82b727867c5d8f7801d36e5522374b9 Mon Sep 17 00:00:00 2001 From: Gustavo Ambrozio Date: Mon, 19 May 2025 21:36:44 -1000 Subject: [PATCH] [at581x] Fix issue with methods not being public (#8852) --- esphome/components/at581x/at581x.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/esphome/components/at581x/at581x.h b/esphome/components/at581x/at581x.h index 6c637d08c5..558a5c8b19 100644 --- a/esphome/components/at581x/at581x.h +++ b/esphome/components/at581x/at581x.h @@ -14,11 +14,8 @@ namespace esphome { namespace at581x { class AT581XComponent : public Component, public i2c::I2CDevice { -#ifdef USE_SWITCH - protected: - switch_::Switch *rf_power_switch_{nullptr}; - public: +#ifdef USE_SWITCH void set_rf_power_switch(switch_::Switch *s) { this->rf_power_switch_ = s; s->turn_on(); @@ -48,6 +45,9 @@ class AT581XComponent : public Component, public i2c::I2CDevice { bool i2c_read_reg(uint8_t addr, uint8_t &data); protected: +#ifdef USE_SWITCH + switch_::Switch *rf_power_switch_{nullptr}; +#endif int freq_; int self_check_time_ms_; /*!< Power-on self-test time, range: 0 ~ 65536 ms */ int protect_time_ms_; /*!< Protection time, recommended 1000 ms */