I’m using lcd_pcf8574 and I would like to display a progress in %
display:
- platform: lcd_pcf8574
dimensions: 20x4
I’m experimenting two “challenges”
I’m not able to display % symbols (I think because % char requires some kind of escape char) it.printf(19, 0, "%");
When I display the progress I would like to keep the digit close to the right, but as it goes from 0 to 100, I will have some space between the start position and the % char
0 %
10 %
100%
how I can align the digit to the right based of the range (0-9,10-99,100)?
/config/esphome/sprinkler.yaml: In lambda function:
/config/esphome/sprinkler.yaml:50:52: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
it.printf(19, 0, TextAlign::TOP_RIGHT, "%%");
^
In file included from src/esphome.h:35:0,
from src/main.cpp:3:
src/esphome/components/lcd_base/lcd_display.h:44:8: note: initializing argument 1 of 'void esphome::lcd_base::LCDDisplay::printf(const char*, ...)'
void printf(const char *format, ...) __attribute__((format(printf, 2, 3)));