Replies: 1 comment
-
Solved. Finally found the bug (?) in IDE. For more complex projects I'm using Tabs in Arduino IDE. Usually had project name .INO file empty and all declarations and #include directives moved to 01-variables.ino and code to xx-name.ino files (to keep the alphabetical order for the complier). In this case I met the 1st time situation when the #include ArduinoHA.h need to be moved to exactly the 1st tab in the complier queue (project name ino file) to eliminate the problem. So, solved. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I give up with this:
"error: 'HALight' has not been declared
void onStateCommand(bool state, HALight * sender){"
code is coming from examples:
#include <Arduino.h>
#include <ArduinoHA.h>
HALight light1("Strip1", HALight::BrightnessFeature | HALight::ColorTemperatureFeature | HALight::RGBFeature);
void onStateCommand(bool state, HALight * sender){
sender->setState(state); // report state back to the Home Assistant
}
... and the rest of the code including onStateCommand assignement.
Compiler is passing the 1st line where HALight was used and stops in the next line with void.
Any suggestions? Help pls.
Overall great library! Sensors works superfine.
Beta Was this translation helpful? Give feedback.
All reactions