diff --git a/config/automations.yaml b/config/automations.yaml index a192776..f673f5d 100644 --- a/config/automations.yaml +++ b/config/automations.yaml @@ -448,8 +448,7 @@ - service: script.text_notify data: who: all_ios - message: The Garden has received {{ states('sensor.previous_rainfall') | int - | round(2) }} inches of rain in the last 48 hours. + message: The Garden has received {{ states('sensor.previous_rainfall') | round(2) }} inches of rain in the last 48 hours. mode: single - id: '1627078744808' alias: buy more xlm diff --git a/config/packages/weather.yaml b/config/packages/weather.yaml index 2eba229..ffcd6b4 100755 --- a/config/packages/weather.yaml +++ b/config/packages/weather.yaml @@ -244,7 +244,7 @@ sensor: value_template: "{{ state_attr('sensor.daily_rainfall_in', 'last_period') }}" previous_rainfall: friendly_name: "Past 48h Rainfall" - value_template: "{{ states('sensor.daily_rainfall_in') | int + state_attr('sensor.daily_rainfall_in', 'last_period') | int }}" + value_template: "{{ states('sensor.daily_rainfall_in') | float + state_attr('sensor.daily_rainfall_in', 'last_period') | float }}" lightning_warning: friendly_name: "Lightning Warning" value_template: >-