I’m trying to display the brightness of a light: on my OLED display. However, I have having trouble finding how to pull that info. I’ve searched the docs and forums but not seeing it anywhere.
I’ve tried the following code, but no matter what I guess at it doesn’t compile. I’ve tried id(lamp).state, .value, .brightness, .get_brightness, etc.
src/main.cpp:590:72: error: 'class esphome::light::LightState' has no member named 'state'
it.printf(0, 0, font_status, TextAlign::TOP_LEFT, "%.1%%", lamp->state);
Using current_values_as_brightness gives me a different error, but it still won’t compile. It looks like that is actually function that requires a pointer to a float parameter that I’m not sure what to do with.