Tweaking NWS weather sensors for new integration method

This commit is contained in:
Jeffrey Stone 2020-05-17 21:31:53 -04:00
parent 12afb6e055
commit b4f915b57f
1 changed files with 37 additions and 37 deletions

View File

@ -101,91 +101,91 @@
{%- endif %} {%- endif %}
nws_current_forecast: nws_current_forecast:
friendly_name: 'Current Forecast' friendly_name: 'Current Forecast'
value_template: "{{ states.weather.klzu.attributes.forecast[0].detailed_description | truncate(250, False) }}" value_template: "{{ states.weather.klzu_daynight.attributes.forecast[0].detailed_description | truncate(250, False) }}"
nws_current_rain_forecast: nws_current_rain_forecast:
friendly_name: 'Current Rain Chance' friendly_name: 'Current Rain Chance'
value_template: "{{ states.weather.klzu.attributes.forecast[0].precipitation_probability }}" value_template: "{{ states.weather.klzu_daynight.attributes.forecast[0].precipitation_probability }}"
unit_of_measurement: '%' unit_of_measurement: '%'
nws_current_temperature: nws_current_temperature:
friendly_name: 'Current Temperature' friendly_name: 'Current Temperature'
value_template: "{{ states.weather.klzu.attributes.temperature }}" value_template: "{{ states.weather.klzu_daynight.attributes.temperature }}"
device_class: temperature device_class: temperature
nws_daytime_temperature: nws_daytime_temperature:
friendly_name: 'Daytime Temperature' friendly_name: 'Daytime Temperature'
value_template: >- value_template: >-
{% if states.weather.klzu.attributes.forecast[0].daytime == True %} {% if states.weather.klzu_daynight.attributes.forecast[0].daytime == True %}
{{ states.weather.klzu.attributes.forecast[0].temperature }} {{ states.weather.klzu_daynight.attributes.forecast[0].temperature }}
{% elif states.weather.klzu.attributes.forecast[1].daytime == True %} {% elif states.weather.klzu_daynight.attributes.forecast[1].daytime == True %}
{{ states.weather.klzu.attributes.forecast[1].temperature }} {{ states.weather.klzu_daynight.attributes.forecast[1].temperature }}
{% endif %} {% endif %}
device_class: temperature device_class: temperature
nws_current_condition: nws_current_condition:
friendly_name: 'Current Condition' friendly_name: 'Current Condition'
value_template: "{{ states.weather.klzu.state }}" value_template: "{{ states.weather.klzu_daynight.state }}"
nws_current_humidity: nws_current_humidity:
friendly_name: 'Current Humidity' friendly_name: 'Current Humidity'
value_template: "{{ states.weather.klzu.attributes.humidity }}" value_template: "{{ states.weather.klzu_daynight.attributes.humidity }}"
nws_current_visibility: nws_current_visibility:
friendly_name: "Current Visability" friendly_name: "Current Visability"
value_template: "{{ states.weather.klzu.attributes.visibility }}" value_template: "{{ states.weather.klzu_daynight.attributes.visibility }}"
nws_current_windspeed: nws_current_windspeed:
friendly_name: "Current Windspeed" friendly_name: "Current Windspeed"
value_template: "{{ states.weather.klzu.attributes.wind_speed }}" value_template: "{{ states.weather.klzu_daynight.attributes.wind_speed }}"
nws_overnight_low: nws_overnight_low:
friendly_name: "Overnight Low" friendly_name: "Overnight Low"
unit_of_measurement: '' unit_of_measurement: ''
value_template: >- value_template: >-
{% if states.weather.klzu.attributes.forecast[0].daytime == False %} {% if states.weather.klzu_daynight.attributes.forecast[0].daytime == False %}
{{ states.weather.klzu.attributes.forecast[0].temperature }} {{ states.weather.klzu_daynight.attributes.forecast[0].temperature }}
{% elif states.weather.klzu.attributes.forecast[1].daytime == False %} {% elif states.weather.klzu_daynight.attributes.forecast[1].daytime == False %}
{{ states.weather.klzu.attributes.forecast[1].temperature }} {{ states.weather.klzu_daynight.attributes.forecast[1].temperature }}
{% endif %} {% endif %}
nws_overnight_forecast: nws_overnight_forecast:
friendly_name: "Overnight Forecast" friendly_name: "Overnight Forecast"
unit_of_measurement: '' unit_of_measurement: ''
value_template: >- value_template: >-
{% if states.weather.klzu.attributes.forecast[0].daytime == False %} {% if states.weather.klzu_daynight.attributes.forecast[0].daytime == False %}
{{ states.weather.klzu.attributes.forecast[0].detailed_description | truncate(250, False) }} {{ states.weather.klzu_daynight.attributes.forecast[0].detailed_description | truncate(250, False) }}
{% elif states.weather.klzu.attributes.forecast[1].daytime == False %} {% elif states.weather.klzu_daynight.attributes.forecast[1].daytime == False %}
{{ states.weather.klzu.attributes.forecast[1].detailed_description | truncate(250, False) }} {{ states.weather.klzu_daynight.attributes.forecast[1].detailed_description | truncate(250, False) }}
{% elif states.weather.klzu.attributes.forecast[2].daytime == False %} {% elif states.weather.klzu_daynight.attributes.forecast[2].daytime == False %}
{{ states.weather.klzu.attributes.forecast[2].detailed_description | truncate(250, False) }} {{ states.weather.klzu_daynight.attributes.forecast[2].detailed_description | truncate(250, False) }}
{% endif %} {% endif %}
nws_forecast_tomorrow: nws_forecast_tomorrow:
friendly_name: "Forecast Tomorrow" friendly_name: "Forecast Tomorrow"
unit_of_measurement: '' unit_of_measurement: ''
value_template: >- value_template: >-
{%- if states.weather.klzu.attributes.forecast[1].daytime == True %} {%- if states.weather.klzu_daynight.attributes.forecast[1].daytime == True %}
{{ states.weather.klzu.attributes.forecast[1].detailed_description | truncate(250, False) }} {{ states.weather.klzu_daynight.attributes.forecast[1].detailed_description | truncate(250, False) }}
{% elif states.weather.klzu.attributes.forecast[2].daytime == True %} {% elif states.weather.klzu_daynight.attributes.forecast[2].daytime == True %}
{{ states.weather.klzu.attributes.forecast[2].detailed_description | truncate(250, False) }} {{ states.weather.klzu_daynight.attributes.forecast[2].detailed_description | truncate(250, False) }}
{%- endif %} {%- endif %}
nws_forecast_rain_tomorrow: nws_forecast_rain_tomorrow:
friendly_name: "Rain Chance Tomorrow" friendly_name: "Rain Chance Tomorrow"
unit_of_measurement: '%' unit_of_measurement: '%'
value_template: >- value_template: >-
{%- if states.weather.klzu.attributes.forecast[1].daytime == True %} {%- if states.weather.klzu_daynight.attributes.forecast[1].daytime == True %}
{{ states.weather.klzu.attributes.forecast[1].precipitation_probability }} {{ states.weather.klzu_daynight.attributes.forecast[1].precipitation_probability }}
{% elif states.weather.klzu.attributes.forecast[2].daytime == True %} {% elif states.weather.klzu_daynight.attributes.forecast[2].daytime == True %}
{{ states.weather.klzu.attributes.forecast[2].precipitation_probability }} {{ states.weather.klzu_daynight.attributes.forecast[2].precipitation_probability }}
{%- endif %} {%- endif %}
nws_forecast_tomorrow_night: nws_forecast_tomorrow_night:
friendly_name: "Forecast Tomorrow Night" friendly_name: "Forecast Tomorrow Night"
unit_of_measurement: '' unit_of_measurement: ''
value_template: >- value_template: >-
{%- if states.weather.klzu.attributes.forecast[1].daytime == True %} {%- if states.weather.klzu_daynight.attributes.forecast[1].daytime == True %}
{{ states.weather.klzu.attributes.forecast[2].detailed_description | truncate(250, False) }} {{ states.weather.klzu_daynight.attributes.forecast[2].detailed_description | truncate(250, False) }}
{% elif states.weather.klzu.attributes.forecast[2].daytime == True %} {% elif states.weather.klzu_daynight.attributes.forecast[2].daytime == True %}
{{ states.weather.klzu.attributes.forecast[3].detailed_description | truncate(250, False) }} {{ states.weather.klzu_daynight.attributes.forecast[3].detailed_description | truncate(250, False) }}
{%- endif %} {%- endif %}
nws_forecast_rain_tomorrow_night: nws_forecast_rain_tomorrow_night:
friendly_name: "Rain Chance Tomorrow Night" friendly_name: "Rain Chance Tomorrow Night"
unit_of_measurement: '%' unit_of_measurement: '%'
value_template: >- value_template: >-
{%- if states.weather.klzu.attributes.forecast[1].daytime == True %} {%- if states.weather.klzu_daynight.attributes.forecast[1].daytime == True %}
{{ states.weather.klzu.attributes.forecast[2].precipitation_probability }} {{ states.weather.klzu_daynight.attributes.forecast[2].precipitation_probability }}
{% elif states.weather.klzu.attributes.forecast[2].daytime == True %} {% elif states.weather.klzu_daynight.attributes.forecast[2].daytime == True %}
{{ states.weather.klzu.attributes.forecast[3].precipitation_probability }} {{ states.weather.klzu_daynight.attributes.forecast[3].precipitation_probability }}
{%- endif %} {%- endif %}
current_inside_humidity: current_inside_humidity:
friendly_name: "Current Inside Humidity" friendly_name: "Current Inside Humidity"