Get max value from a json list in an attribute

I have a sensor which returns the UV values for the next 24 hours in an attribute called List.

Is there some way of returning the max UVclear and UVcloud values for the next 24 hours using a e.g. a template sensor?

[
  {
    "Time": "2022-06-27 01:00",
    "UVclear": 0,
    "UVcloud": 0
  },
  {
    "Time": "2022-06-27 02:00",
    "UVclear": 0,
    "UVcloud": 0
  },
  {
    "Time": "2022-06-27 03:00",
    "UVclear": 0,
    "UVcloud": 0
  },
  {
    "Time": "2022-06-27 04:00",
    "UVclear": 0,
    "UVcloud": 0
  },
  {
    "Time": "2022-06-27 05:00",
    "UVclear": 0.1,
    "UVcloud": 0.1
  },
  {
    "Time": "2022-06-27 06:00",
    "UVclear": 0.3,
    "UVcloud": 0.3
  },
  {
    "Time": "2022-06-27 07:00",
    "UVclear": 0.7,
    "UVcloud": 0.7
  },
  {
    "Time": "2022-06-27 08:00",
    "UVclear": 1.5,
    "UVcloud": 1.4
  },
  {
    "Time": "2022-06-27 09:00",
    "UVclear": 2.5,
    "UVcloud": 2.5
  },
  {
    "Time": "2022-06-27 10:00",
    "UVclear": 3.9,
    "UVcloud": 3.7
  },
  {
    "Time": "2022-06-27 11:00",
    "UVclear": 5.1,
    "UVcloud": 4.9
  },
  {
    "Time": "2022-06-27 12:00",
    "UVclear": 6.1,
    "UVcloud": 5.7
  },
  {
    "Time": "2022-06-27 13:00",
    "UVclear": 6.4,
    "UVcloud": 6
  },
  {
    "Time": "2022-06-27 14:00",
    "UVclear": 6.1,
    "UVcloud": 5.6
  },
  {
    "Time": "2022-06-27 15:00",
    "UVclear": 5.3,
    "UVcloud": 4.8
  },
  {
    "Time": "2022-06-27 16:00",
    "UVclear": 4,
    "UVcloud": 3.6
  },
  {
    "Time": "2022-06-27 17:00",
    "UVclear": 2.7,
    "UVcloud": 2.3
  },
  {
    "Time": "2022-06-27 18:00",
    "UVclear": 1.6,
    "UVcloud": 1.3
  },
  {
    "Time": "2022-06-27 19:00",
    "UVclear": 0.8,
    "UVcloud": 0.6
  },
  {
    "Time": "2022-06-27 20:00",
    "UVclear": 0.3,
    "UVcloud": 0.2
  },
  {
    "Time": "2022-06-27 21:00",
    "UVclear": 0.1,
    "UVcloud": 0.1
  },
  {
    "Time": "2022-06-27 22:00",
    "UVclear": 0,
    "UVcloud": 0
  },
  {
    "Time": "2022-06-27 23:00",
    "UVclear": 0,
    "UVcloud": 0
  }
]

I tested this in the template tools, not sure how it will preform in “real”.

{% set List = [
  {
    "Time": "2022-06-27 01:00",
    "UVclear": 0,
    "UVcloud": 0
  },
  {
    "Time": "2022-06-27 02:00",
    "UVclear": 0,
    "UVcloud": 0
  },
  {
    "Time": "2022-06-27 03:00",
    "UVclear": 0,
    "UVcloud": 0
  },
  {
    "Time": "2022-06-27 04:00",
    "UVclear": 0,
    "UVcloud": 0
  },
  {
    "Time": "2022-06-27 05:00",
    "UVclear": 0.1,
    "UVcloud": 0.1
  },
  {
    "Time": "2022-06-27 06:00",
    "UVclear": 0.3,
    "UVcloud": 0.3
  },
  {
    "Time": "2022-06-27 07:00",
    "UVclear": 0.7,
    "UVcloud": 0.7
  },
  {
    "Time": "2022-06-27 08:00",
    "UVclear": 1.5,
    "UVcloud": 1.4
  },
  {
    "Time": "2022-06-27 09:00",
    "UVclear": 2.5,
    "UVcloud": 2.5
  },
  {
    "Time": "2022-06-27 10:00",
    "UVclear": 3.9,
    "UVcloud": 3.7
  },
  {
    "Time": "2022-06-27 11:00",
    "UVclear": 5.1,
    "UVcloud": 4.9
  },
  {
    "Time": "2022-06-27 12:00",
    "UVclear": 6.1,
    "UVcloud": 5.7
  },
  {
    "Time": "2022-06-27 13:00",
    "UVclear": 6.4,
    "UVcloud": 6
  },
  {
    "Time": "2022-06-27 14:00",
    "UVclear": 6.1,
    "UVcloud": 5.6
  },
  {
    "Time": "2022-06-27 15:00",
    "UVclear": 5.3,
    "UVcloud": 4.8
  },
  {
    "Time": "2022-06-27 16:00",
    "UVclear": 4,
    "UVcloud": 3.6
  },
  {
    "Time": "2022-06-27 17:00",
    "UVclear": 2.7,
    "UVcloud": 2.3
  },
  {
    "Time": "2022-06-27 18:00",
    "UVclear": 1.6,
    "UVcloud": 1.3
  },
  {
    "Time": "2022-06-27 19:00",
    "UVclear": 0.8,
    "UVcloud": 0.6
  },
  {
    "Time": "2022-06-27 20:00",
    "UVclear": 0.3,
    "UVcloud": 0.2
  },
  {
    "Time": "2022-06-27 21:00",
    "UVclear": 0.1,
    "UVcloud": 0.1
  },
  {
    "Time": "2022-06-27 22:00",
    "UVclear": 0,
    "UVcloud": 0
  },
  {
    "Time": "2022-06-27 23:00",
    "UVclear": 0,
    "UVcloud": 0
  }
] %}

{% for a in List |sort(attribute="UVclear", reverse=true) %}  
{%- if loop.first %}
{{ a }}
{% endif %}
{% endfor %}

If you only want time or value use {{ a.UVclear }}.