You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compiling nobo.yaml with esphome, following error occurs in lambda function:
...
/config/esphome/esphome-web-e03626.yaml: In lambda function:
/config/esphome/esphome-web-e03626.yaml:91:41: error: 'class esphome::nobo::NoboClimate' has no member named 'get_heater_power_percentage'; did you mean 'float esphome::nobo::NoboClimate::heater_power_percentage_'? (not accessible from this context)
91 | float current_power = id(noboheater).get_heater_power_percentage();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/esphome.h:55,
from src/main.cpp:3:
src/esphome/components/nobo/nobo.h:37:10: note: declared protected here
37 | float heater_power_percentage_;
| ^~~~~~~~~~~~~~~~~~~~~~~~
Compiling .pioenvs/nobo/lib67b/ESP8266WiFi/WiFiServerSecureBearSSL.cpp.o
Compiling .pioenvs/nobo/lib67b/ESP8266WiFi/WiFiUdp.cpp.o
Compiling .pioenvs/nobo/lib67b/ESP8266WiFi/enable_wifi_at_boot_time.cpp.o
*** [.pioenvs/nobo/src/main.cpp.o] Error 1
========================== [FAILED] Took 9.76 seconds ==========================
Workaround / Fix:
Fixed error by adding public getter to following line in nobo.h file:
class NoboClimate : public climate::Climate, public Component, public i2c::I2CDevice {
public:
// ... existing public methods ...
// Add this new public getter method
float get_heater_power_percentage() const { return heater_power_percentage_; }
// ... rest of the class definition remains the same
};
} // namespace nobo
} // namespace esphome
The text was updated successfully, but these errors were encountered:
What is the issue?
When compiling nobo.yaml with esphome, following error occurs in lambda function:
...
/config/esphome/esphome-web-e03626.yaml: In lambda function:
/config/esphome/esphome-web-e03626.yaml:91:41: error: 'class esphome::nobo::NoboClimate' has no member named 'get_heater_power_percentage'; did you mean 'float esphome::nobo::NoboClimate::heater_power_percentage_'? (not accessible from this context)
91 | float current_power = id(noboheater).get_heater_power_percentage();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/esphome.h:55,
from src/main.cpp:3:
src/esphome/components/nobo/nobo.h:37:10: note: declared protected here
37 | float heater_power_percentage_;
| ^~~~~~~~~~~~~~~~~~~~~~~~
Compiling .pioenvs/nobo/lib67b/ESP8266WiFi/WiFiServerSecureBearSSL.cpp.o
Compiling .pioenvs/nobo/lib67b/ESP8266WiFi/WiFiUdp.cpp.o
Compiling .pioenvs/nobo/lib67b/ESP8266WiFi/enable_wifi_at_boot_time.cpp.o
*** [.pioenvs/nobo/src/main.cpp.o] Error 1
========================== [FAILED] Took 9.76 seconds ==========================
Workaround / Fix:
Fixed error by adding public getter to following line in nobo.h file:
class NoboClimate : public climate::Climate, public Component, public i2c::I2CDevice {
public:
// ... existing public methods ...
// Add this new public getter method
float get_heater_power_percentage() const { return heater_power_percentage_; }
// ... rest of the class definition remains the same
};
} // namespace nobo
} // namespace esphome
The text was updated successfully, but these errors were encountered: