Fixing previous day rainfall sensor and automations
This commit is contained in:
parent
189e4d87a4
commit
fb5bc0583a
|
@ -448,8 +448,7 @@
|
||||||
- service: script.text_notify
|
- service: script.text_notify
|
||||||
data:
|
data:
|
||||||
who: all_ios
|
who: all_ios
|
||||||
message: The Garden has received {{ states('sensor.previous_rainfall') | int
|
message: The Garden has received {{ states('sensor.previous_rainfall') | round(2) }} inches of rain in the last 48 hours.
|
||||||
| round(2) }} inches of rain in the last 48 hours.
|
|
||||||
mode: single
|
mode: single
|
||||||
- id: '1627078744808'
|
- id: '1627078744808'
|
||||||
alias: buy more xlm
|
alias: buy more xlm
|
||||||
|
|
|
@ -244,7 +244,7 @@ sensor:
|
||||||
value_template: "{{ state_attr('sensor.daily_rainfall_in', 'last_period') }}"
|
value_template: "{{ state_attr('sensor.daily_rainfall_in', 'last_period') }}"
|
||||||
previous_rainfall:
|
previous_rainfall:
|
||||||
friendly_name: "Past 48h 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:
|
lightning_warning:
|
||||||
friendly_name: "Lightning Warning"
|
friendly_name: "Lightning Warning"
|
||||||
value_template: >-
|
value_template: >-
|
||||||
|
|
Loading…
Reference in New Issue