Measuring rain using several sources

I have the following sensors:

- platform: history_stats
    name: history_rainy_past_two_days_rainsensor
    entity_id: binary_sensor.rainsensor
    state: "on"
    type: time
    end: "{{ now() }}"
    duration:
      days: 2

  - platform: history_stats
    name: history_rainy_past_two_days_ecobee
    entity_id: weather.my_ecobee3
    state: "rainy"
    type: time
    end: "{{ now() }}"
    duration:
      days: 2

And I am using this to trigger (avg of both):

- platform: template
    sensors:
      history_rainy_past_two_days:
        entity_id: sensor.date, sun.sun
        friendly_name: "Rain in the Past 2 Days"
        value_template: "{{ ((states('sensor.history_rainy_past_two_days_rainsensor') | float + states('sensor.history_rainy_past_two_days_ecobee') | float) / 2) | round }}"
        unit_of_measurement: "h"

But now I want to add a 3rd source using SmartWeather: sensor.smartweather_rain_minutes_today
rain

Whats the best way to add this new sensor to my equation above so that I can average all 3 sensors?
I was thinking something like this where state is greater than 0:

  - platform: history_stats
    name: history_rainy_past_two_days_smartweather
    entity_id: sensor.smartweather_rain_minutes_today
    state: >0
    type: time
    end: "{{ now() }}"
    duration:
      days: 2

Maybe I need the following will have to test this out…

binary_sensor:
- platform: template
    sensors:
      smartweather_rain_on:
        friendly_name: "SmartWearther Rain On"
        value_template: >-
          {{ (states('sensor.smartweather_rain_minutes_today') | int)  > 0 }}

then

  - platform: history_stats
    name: history_rainy_past_two_days_smartweather
    entity_id: sensor.smartweather_rain_on
    state: "on"
    type: time
    end: "{{ now() }}"
    duration:
      days: 2

Why all my history sensors are shown as “unknown”??

Ok all seems to work…