Is it possible to use a variable to draw a shape in Esphome display component?
For example:
int volume;
volume = id(sensor.sonos_volume_int).state;
it.filled_rectangle(0,0,volume,4);
This does not work. It just displays nothing.
The idea is to draw a rectangle where the length depends on what the value is of the volume variable.
The variable declaration seems to work: I’m able to display the variable with it.printf. But is it possible to reference it in other functions?