Hello to all,
I am seeking for some help as i am terrible with coding and APIs . I have a NodeMCU flashed with WLED on the back of my TV and i use Home Assistant to control it. I have a small new project in mind to create an LED time visual timer that uses the LEDs to display how much time remains in a movie i am watching.
For example. Movie has just started, all LEDs are on. As the movie progresses, LEDs are turning off one by one until the end of the movie.
I am using Plex, and it exposes attributes to Home Assistant providing information of the āmedia_durationā and āmedia_positionā so it should be possible to calculate every how much positions an LED should turn off. For example: if the movie has āmedia_durationā 6532 and i have 204 LEDs, an LED should turn off after: 6532/204 = 32.
How can i say to WLED to be turning off one LED (from start) every 32 positions? Something tells me that i need to use the json api but i need some help please.
Thank you very much
M