The docs here
show states like
"clear"
: Represents the lack of any significant weather occurring and cloud cover covering less than 11.5% of the sky."light-wind"
: Represents light wind at a location. (15 mph (~24.14 km/h) or greater)"medium-wind"
: Represents moderate wind at a location. (~22.37 mph (36 km/h) or greater)"heavy-wind"
: Represents strong wind at a location. (40 mph (~64.37 km/h) or greater)
That’s nice, but when I check
that is not what the state returns
What is the deal?
I’m doing weather:
binary_sensor:
- name: bad_weather
unique_id: bad_weather
icon: mdi:weather-pouring
state: >
{{ states('weather.pirateweather') in [
'possible-very-light-rain', 'very-light-rain',
'possible-light-rain', 'light-rain',
'medium-rain', 'heavy-rain',
'possible-thunderstorm', 'thunderstorm',
'possible-very-light-snow', 'very-light-snow',
'possible-light-snow', 'light-snow',
'medium-snow', 'heavy-snow',
'possible-very-light-sleet', 'very-light-sleet',
'possible-light-sleet', 'light-sleet',
'medium-sleet', 'heavy-sleet',
'possible-very-light-precipitation', 'very-light-precipitation',
'possible-light-precipitation', 'light-precipitation',
'medium-precipitation', 'heavy-precipitation'
] }}
- name: cloudy_weather
unique_id: cloudy_weather
icon: mdi:weather-cloudy
state: >
{{ states('weather.pirateweather') in [
'very-light-clouds', 'light-clouds',
'medium-clouds', 'heavy-clouds'
] }}
- name: clear_weather
unique_id: clear_weather
icon: mdi:weather-sunny
state: >
{{ states('weather.pirateweather') in [
'clear'
] }}
- name: windy_weather
unique_id: windy_weather
icon: mdi:weather-windy
state: >
{{ states('weather.pirateweather') in [
'light-wind', 'medium-wind', 'heavy-wind'
] }}