Fixing previous day rainfall sensor and automations

This commit is contained in:
Jeffrey Stone 2021-08-28 15:54:53 -04:00
parent 189e4d87a4
commit fb5bc0583a
2 changed files with 2 additions and 3 deletions

View File

@ -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

View File

@ -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: >-