Rework precipitation sensor
This commit is contained in:
@ -75,6 +75,19 @@ template:
|
||||
device_class: safety
|
||||
attributes:
|
||||
current_strikes: "{{ states('sensor.blitzortung_lightning_counter') | int }}"
|
||||
- name: Precipitation
|
||||
unique_id: 2423f8c6-f9ce-4063-a7f8-30dc260d1376
|
||||
state: "{{ states('weather.iron_nerd_weather_station') in ['rainy','thunderstorm','lightning','sleet','snow','snowy','hail','tornado'] }}"
|
||||
attributes:
|
||||
type_of_precipitation: >
|
||||
{% if states('weather.iron_nerd_weather_station') in ['rainy','thunderstorm','lightning','hail','tornado'] %}
|
||||
Rain
|
||||
{% elif states('weather.iron_nerd_weather_station') in ['sleet','snow','snowy'] %}
|
||||
Snow
|
||||
{% else %}
|
||||
N/A
|
||||
{% endif %}
|
||||
icon: mdi:water
|
||||
|
||||
sensor:
|
||||
- platform: weatheralerts
|
||||
|
@ -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') }}
|
Reference in New Issue
Block a user