From 52adf0ff89224fcac7ba606e1d054ba1af288dd8 Mon Sep 17 00:00:00 2001 From: mikosoft83 <63317931+mikosoft83@users.noreply.github.com> Date: Sat, 2 Nov 2024 23:00:01 +0100 Subject: [PATCH] Update display.h --- esphome/components/display/display.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/esphome/components/display/display.h b/esphome/components/display/display.h index 54e897cdec..e3bdadb48c 100644 --- a/esphome/components/display/display.h +++ b/esphome/components/display/display.h @@ -447,6 +447,20 @@ class Display : public PollingComponent { * @param format The strftime format to use. * @param time The time to format. */ + void strftime(int x, int y, BaseFont *font, Color color, Color background TextAlign align, const char *format, + ESPTime time) + __attribute__((format(strftime, 7, 0))); + + /** Evaluate the strftime-format `format` and print the result with the top left at [x,y] with `font`. + * + * @param x The x coordinate of the upper left corner. + * @param y The y coordinate of the upper left corner. + * @param font The font to draw the text with. + * @param color The color to draw the text with. + * @param background The background color to draw the text with. + * @param format The strftime format to use. + * @param time The time to format. + */ void strftime(int x, int y, BaseFont *font, Color color, TextAlign align, const char *format, ESPTime time) __attribute__((format(strftime, 7, 0)));