You can do a statistics card for rain over 7 days (total per day).
You will need a statistics meter setup for your rain gauge to count the total per day and reset at midnight.
Statistics meter in Home Assistant takes the total rain your ESPhome code has, and makes it long-term. So HA will keep counting up if the ESP shuts off and forgets the total.
A statistics card:
type: statistics-graph
title: Rain – last 7 days
chart_type: bar
period: day
days_to_show: 7
stat_types:
- state
entities:
- sensor.rain_daily
Copy/paste that lovelace yaml code into a ‘manual’ when creating a card.
Click save. Then edit again, and you’ll see the normal visual editor.

