Template group by area

Hi Iā€™m trying to write a template that lists all my plants that need watering.

I have the following so far

{% for plant in states.plant | selectattr('attributes.moisture_status', 'match', 'Low') %}
  {{- plant.name }} šŸ’§{% if 'low' in plant.attributes.conductivity_status %}šŸ’©{% endif -%} {% if not loop.last %}, {% endif -%}
{% endfor %}

But how would I go about grouping by area? (I found the groupby function, but it takes a string and area_name('...') is a function?)

I found the areas() and area_entities() functions, while a bit more verbose it should be possible to do a outer loop with it