Linking LVGL widget controls and Template components on the web page

I’ve been using Template Components, such as a Template Number to control the speed on a PWM based fan. I’d like to be able to put an LCD touch screen on the fan controller so I can control the fans remotely (through Home Assistant and the web page), and can use an LCD screen connected to the ESP32. If I use LVGL Sliders on the LCD, then they will serve as a speed indicator as well as a control.

I’m thinking I can use on_value or on_chnage in these components to change the value/state in the other “paired” component. I was wondering if there’s an easier way to link the web template component with the LVGL component.

Use an lvgl number linked to the widget, not a template number.

But don’t I have to link it to both, so both the LVGL widget and the Template Number on the web page will both change in sync?

Why do you want two numbers?

Sorry. I think I conflated two things because I misread that. I’ll have to go over it tonight and make sure I am clear on what you mean.

I think you’re saying I can use just one number, an LVGL Number - but can I control that through the web server as well as on the LVGL display?

Yes, that’s correct.