Closed hmjgriffon1 closed 10 months ago
Could you try and install the latest release 2.3.1 and see if this fixes the issue.
The other issue was fixed but this one was not sorry.
I also get this now which I think is new in addition to the other error.
Logger: homeassistant.helpers.template_entity Source: helpers/template_entity.py:397 First occurred: 10:36:32 PM (10 occurrences) Last logged: 10:36:32 PM
TemplateError('ValueError: Template error: float got invalid input 'unknown' when rendering template '{{ states('sensor.tempest_st_00113901_temperature') | float}}' but no default was specified') while processing template 'Template<template=({{ states('sensor.tempest_st_00113901_temperature') | float}}) renders=4>' for attribute '_temperature' in entity 'weather.dogville_daily_forecast' TemplateError('ValueError: Template error: int got invalid input 'unknown' when rendering template '{{ states('sensor.tempest_st_00113901_humidity')| int }}' but no default was specified') while processing template 'Template<template=({{ states('sensor.tempest_st_00113901_humidity')| int }}) renders=4>' for attribute '_humidity' in entity 'weather.dogville_daily_forecast' TemplateError('ValueError: Template error: float got invalid input 'unknown' when rendering template '{{ states('sensor.tempest_st_00113901_sea_level_pressure')| float }}' but no default was specified') while processing template 'Template<template=({{ states('sensor.tempest_st_00113901_sea_level_pressure')| float }}) renders=4>' for attribute '_pressure' in entity 'weather.dogville_daily_forecast' TemplateError('ValueError: Template error: int got invalid input 'unknown' when rendering template '{{ states('sensor.tempest_st_00113901_wind_bearing_avg')| int }}' but no default was specified') while processing template 'Template<template=({{ states('sensor.tempest_st_00113901_wind_bearing_avg')| int }}) renders=4>' for attribute '_wind_bearing' in entity 'weather.dogville_daily_forecast' TemplateError('ValueError: Template error: float got invalid input 'unknown' when rendering template '{{ states('sensor.tempest_st_00113901_visibility')| float }}' but no default was specified') while processing template 'Template<template=({{ states('sensor.tempest_st_00113901_visibility')| float }}) renders=4>' for attribute '_visibility' in entity 'weather.dogville_daily_forecast'
And you specified a Station ID and Personal Token. Would you mind sharing your Station ID, so I can have a look at the raw data?
Yeah, I am getting forecast info, I'm assuming it's telling me that the stuff I put into the config yaml is going to stop working at some point. Is there a way I can send you my station ID in a DM or something?
Send your Station ID via Email to bjarne@briis.com and I will have a look.
sent.
Here is my config.
temperature_template: "{{ states('sensor.tempest_st_00113901_temperature') | float}}" humidity_template: "{{ states('sensor.tempest_st_00113901_humidity')| int }}" pressure_template: "{{ states('sensor.tempest_st_00113901_sea_level_pressure')| float }}" wind_speed_template: "{{ states('sensor.tempest_st_00113901_wind_speed_avg') }}" wind_bearing_template: "{{ states('sensor.tempest_st_00113901_wind_bearing_avg')| int }}" visibility_template: "{{ states('sensor.tempest_st_00113901_visibility')| float }}" forecast_template: "{{ state_attr('sensor.hub_hb_00120757_weather', 'daily_forecast') }}"
Try and change the lines from
temperature_template: "{{ states('sensor.tempest_st_00113901_temperature') | float}}"
to
temperature_template: "{{ states('sensor.tempest_st_00113901_temperature') | float(default=0)}}"
This should prevent an error if no data is present.
I restarted the addon and I don't see that error in the logs now, I will see if it re appears, I wonder if anyone else has the same issue.
On Sat, Sep 2, 2023 at 1:27 PM Bjarne Riis @.***> wrote:
Try and change the lines from temperature_template: "{{ states('sensor.tempest_st_00113901_temperature') | float}}" to temperature_template: "{{ states('sensor.tempest_st_00113901_temperature') | float(default=0)}}" This should prevent an error if no data is present.
— Reply to this email directly, view it on GitHub https://github.com/briis/hass-weatherflow2mqtt/issues/239#issuecomment-1703894836, or unsubscribe https://github.com/notifications/unsubscribe-auth/A47NQ2BC3PYAHMBOOAZYD4LXYNUB7ANCNFSM6AAAAAA4FIYAK4 . You are receiving this because you authored the thread.Message ID: @.***>
I got stuff in my HA log the other day that the weather entity code I had in my configuration.yaml is deprecated so I took it out and now I see a sensor with a bunch of forecast stuff under it, how do I turn that into a weather card now?
I am also seeing this issue related to the daily_forecast:
Error validating template result '[{'datetime': '2023-09-14T22:00:00+00:00', 'conditions': 'Clear', 'condition': 'sunny', 'temperature': 23.0, 'templow': 12.0, 'precipitation': 0, 'precipitation_probability': 10, 'precip_icon': 'chance-rain', 'precip_type': 'rain', 'wind_speed': 14.0, 'wind_bearing': 84, 'wind_direction_cardinal': 'O'}, {'datetime': '2023-09-15T22:00:00+00:00', 'conditions': 'Rain Possible', 'condition': 'rainy', 'temperature': 24.0, 'templow': 10.0, 'precipitation': 0, 'precipitation_probability': 20, 'precip_icon': 'chance-rain', 'precip_type': 'rain', 'wind_speed': 6.6, 'wind_bearing': 99, 'wind_direction_cardinal': 'O'}, {'datetime': '2023-09-16T22:00:00+00:00', 'conditions': 'Rain Possible', 'condition': 'rainy', 'temperature': 25.0, 'templow': 12.0, 'precipitation': 0, 'precipitation_probability': 20, 'precip_icon': 'chance-rain', 'precip_type': 'rain', 'wind_speed': 6.2, 'wind_bearing': 131, 'wind_direction_cardinal': 'SO'}, {'datetime': '2023-09-17T22:00:00+00:00', 'conditions': 'Thunderstorms Likely', 'condition': 'lightning', 'temperature': 27.0, 'templow': 13.0, 'precipitation': 6.23, 'precipitation_probability': 100, 'precip_icon': 'chance-rain', 'precip_type': 'storm', 'wind_speed': 10.5, 'wind_bearing': 198, 'wind_direction_cardinal': 'SSW'}, {'datetime': '2023-09-18T22:00:00+00:00', 'conditions': 'Rain Likely', 'condition': 'rainy', 'temperature': 21.0, 'templow': 14.0, 'precipitation': 3.58, 'precipitation_probability': 90, 'precip_icon': 'chance-rain', 'precip_type': 'rain', 'wind_speed': 15.6, 'wind_bearing': 251, 'wind_direction_cardinal': 'WSW'}, {'datetime': '2023-09-19T22:00:00+00:00', 'conditions': 'Rain Possible', 'condition': 'rainy', 'temperature': 22.0, 'templow': 12.0, 'precipitation': 0, 'precipitation_probability': 30, 'precip_icon': 'chance-rain', 'precip_type': 'rain', 'wind_speed': 8.7, 'wind_bearing': 197, 'wind_direction_cardinal': 'SSW'}, {'datetime': '2023-09-20T22:00:00+00:00', 'conditions': 'Rain Likely', 'condition': 'rainy', 'temperature': 24.0, 'templow': 11.0, 'precipitation': 0.67, 'precipitation_probability': 70, 'precip_icon': 'chance-rain', 'precip_type': 'rain', 'wind_speed': 8.2, 'wind_bearing': 169, 'wind_direction_cardinal': 'S'}, {'datetime': '2023-09-21T22:00:00+00:00', 'conditions': 'Rain Likely', 'condition': 'rainy', 'temperature': 20.0, 'templow': 14.0, 'precipitation': 7.59, 'precipitation_probability': 70, 'precip_icon': 'chance-rain', 'precip_type': 'rain', 'wind_speed': 10.2, 'wind_bearing': 223, 'wind_direction_cardinal': 'SW'}, {'datetime': '2023-09-22T22:00:00+00:00', 'conditions': 'Rain Likely', 'condition': 'rainy', 'temperature': 17.0, 'templow': 11.0, 'precipitation': 7.27, 'precipitation_probability': 60, 'precip_icon': 'chance-rain', 'precip_type': 'rain', 'wind_speed': 11.6, 'wind_bearing': 261, 'wind_direction_cardinal': 'W'}, {'datetime': '2023-09-23T22:00:00+00:00', 'conditions': 'Rain Likely', 'condition': 'rainy', 'temperature': 18.0, 'templow': 9.0, 'precipitation': 2.9, 'precipitation_probability': 50, 'precip_icon': 'chance-rain', 'precip_type': 'rain', 'wind_speed': 10.2, 'wind_bearing': 241, 'wind_direction_cardinal': 'WSW'}]' from template 'Template<template=({{ state_attr('sensor.hub_hb_00026294_weather', 'daily_forecast') }}) renders=10>' for attribute '_forecast_daily' in entity weather.wetter_gruentegernbach validation message 'Only valid keys in Forecast are allowed, see Weather documentation https://www.home-assistant.io/integrations/weather/'
As of the latest HomeAssistant - presumably since the change to the get forecast service call, the following keys are no longer allowed for daily forecast:
unallowed keys: ({'conditions', 'wind_direction_cardinal', 'precip_icon', 'precip_type'}), see Weather documentation https://www.home-assistant.io/integrations/weather/
The following keys are no longer allowed in hourly forecast:
unallowed keys: ({'uv', 'wind_gust', 'conditions', 'precip_icon', 'precip_type', 'feels_like', 'wind_direction_cardinal'}), see Weather documentation https://www.home-assistant.io/integrations/weather/
The example templated weather entity will not have forecast data if these keys are present.
This should have been fixed in the latest release. Have you installed that? Have a look here: https://github.com/briis/hass-weatherflow2mqtt/issues/244
I would just like to confirm that for me this is indeed fixed.
@OP can we close this issue?
Home Assistant Version?
2023.8.4
Add-On or Self Hosted?
HA Supervised (Add-On)
Weatherflow2MQTT version?
3.0.2.
What happened?
sometime after I set this up it started complaining in the HA logs, I don't know how these are supposed to be configured but I assume they will stop working at some point.
Relevant log output