Change the names of a legend in a chart within a widget

In a widget with a chart, I would like to be able to:

  • automatically change the name → have Room Temp. instead of Room Temperature (which comes from the device’s feature) and Setpoint instead of Temperature for example, using the names of the 2 default pills if they are the ones providing the values to the chart
  • retrieve the room name to have Living Room Temp. instead of Room Temp. for example
  • have the legend translated into the 4 languages currently supported by Gladys if the legend is “modified” automatically
  • be able to manually edit the legend names.

I am currently working on this topic.

Here is the PR: