Acurite 5n1 rain sensor

I’m new to PWS; I’m setting up a Acurite 5n1 Iris, utilizing a rtl_433/MQTT. The unit is mounted at about 12 ft, on a PVC mast. The rain sensor is cumulative, with the initial reading being 0.170 in (it’s totally dry, no rain as yet).

To start out with zero, I set up a new sensor

 - platform: template
        friendly_name: "Total Rainfall"
        unit_of_measurement: 'in'
        value_template: >
          {% set rain = states('sensor.acurite_5n1_a_2482_rain_total') | float %}
          {{ '%.2f' | format(max(rain - 0.170, 0)) }}

This displays as 0.0 for total rainfall. So as rain accumulates it should give me a cumulative total (less the 0.170), right?

If I’m good so far, what’s the best strategy for calculating daily rainfall?