i don’t quite grock how you want to parse the text value. looks like your code is only looking at the date part? but setting aside how you extract the value from the text, which i think you have already figured out, your main question is how to get the min of the reslts.
take a look at this and see if this helps:
{% set entities = [ 'sensor.sensor1', 'sensor.sensor2', 'sensor.sensor3' ] %}
{% set ns = namespace(items=[]) %}
{% for entity in entities %}
{% set ns.items = ns.items + [ (entity, states(entity)) ] %}
{% endfor %}
{{ ns.items | sort(attribute=1) | map(attribute=0) | first}}
this creates a list with all of the entities and the values i want to sort on. i’ve used ‘states(entity)’ but you can replace it with dhm_val.
then at the end, i do a sort using attribute=1 (which will sort on your dhm_val). then i map(attribute=0) which just picks the entity id, and ask for the first. since it’s sorted lowest to highest, the first will be the lowest.