Problem rotating image dynamically with ESPHOME LVGL

Hi,

Trying to rotate a second hand (image) from a watch in LVGL.

This is a fragment of the code:
time …
then:
- lvgl.image.update:
id: img_chand
angle: !lambda |-
return 6*(id(time_comp).now().minute);
pivot_x: 5
pivot_y: 148

replacing the lamba with a value like 90 works fine. With the lambda function I get this:

        This option is not templatable!.
        angle: !lambda |-
          return 6*(id(time_comp).now().minute);

How can I make this working?

In the ESPHome documentation there are some examples of clocks and they use the meter widget. This makes building a clock simple as it creates all the ticks for you.

I built a tide clock with a graphic image for a hand. You can see how I did it here. It works quite well.

I also have some examples of clock faces in my repo but not using graphical hands.

I saw the example and have it running but I want my clock being based on a watch face image and moving hands. Where the moving hands are also images of the hands of an original watch. Still looking for a possibility to rotate (change angle) of the hand images every minute. Still didn’t get it working.

Andrew you just put me on another track that seems to work. Using an image as indicator on a further transparent clock on the background of the watch face I want to use.

Yes that works well for clocks.