Rework precipitation sensor

This commit is contained in:
2023-04-03 18:29:10 -04:00
parent bdcc1b6efc
commit dc3d175e68
2 changed files with 14 additions and 10 deletions

View File

@ -1,13 +1,4 @@
binary_sensor:
- name: People Present
state: >
{{ is_state('person.tony_stork', 'home') or is_state('person.christina_stork', 'home') }}
- name: Precipitation
state: >-
{% if states.weather.iron_nerd_weather_station.state in ['rainy','thunderstorm','lightning','sleet','snow','snowy','hail'] %}
true
{% else %}
false
{% endif %}
icon: mdi:water
{{ is_state('person.tony_stork', 'home') or is_state('person.christina_stork', 'home') }}