Rework precipitation sensor
This commit is contained in:
@ -75,6 +75,19 @@ template:
|
|||||||
device_class: safety
|
device_class: safety
|
||||||
attributes:
|
attributes:
|
||||||
current_strikes: "{{ states('sensor.blitzortung_lightning_counter') | int }}"
|
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:
|
sensor:
|
||||||
- platform: weatheralerts
|
- platform: weatheralerts
|
||||||
|
@ -2,12 +2,3 @@ binary_sensor:
|
|||||||
- name: People Present
|
- name: People Present
|
||||||
state: >
|
state: >
|
||||||
{{ is_state('person.tony_stork', 'home') or is_state('person.christina_stork', 'home') }}
|
{{ 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
|
|
Reference in New Issue
Block a user