From the efergy component I have 4 sensors which should be day, week, month, year
sensor.energy_consumed
sensor.energy_consumed_2
sensor.energy_consumed_3
sensor.energy_consumed_4
unfortunately at each restart the names get mixed up (the day becomes week, or month becomes day and so on).
Of course is very clear which are the correct ones: daily value is the sensor with the lowest value, weekly value is the second lowest value and so on …
Basically from the sensor above, how to create 4 new sensors with values in ascending order?