Weather forecast doesn't show correct condition_id and icon

hi there,

I’m using Met.no integration and using weather.home to bind the values. It’s working fine for current date but for the forecast, it’s showing the all same icon as the current one:

image

but the result is shown correctly in HA, under Development Tools:

I see the Condition ID for the forecast is binding to the parent weather.home - is it because of that, only getting result of the current day?

This is HA config:

sensor:
  - platform: template
    sensors:
      day1_temp_high:
        friendly_name: "Day1 Temperature"
        unit_of_measurement: '°C'
        value_template: "{{ state_attr('weather.home', 'forecast')[0].temperature }}"
      day1_temp_low:
        friendly_name: "Day1 Low Temperature"
        unit_of_measurement: '°C'
        value_template: "{{ state_attr('weather.home', 'forecast')[0].templow }}"
      day2_temp_high:
        friendly_name: "Day2 Temperature"
        unit_of_measurement: '°C'
        value_template: "{{ state_attr('weather.home', 'forecast')[1].temperature }}"
      day2_temp_low:
        friendly_name: "Day2 Low Temperature"
        unit_of_measurement: '°C'
        value_template: "{{ state_attr('weather.home', 'forecast')[2].templow }}"
      day3_temp_high:
        friendly_name: "Day3 Temperature"
        unit_of_measurement: '°C'
        value_template: "{{ state_attr('weather.home', 'forecast')[2].temperature }}"
      day3_temp_low:
        friendly_name: "Day3 Low Temperature"
        unit_of_measurement: '°C'
        value_template: "{{ state_attr('weather.home', 'forecast')[2].templow }}"

Any thing I’m missing or doing wrong here?

-S

Forecast from HASS weather components is not supported yet. There are some technical challenges with that, so it has been delayed.

@igor you meant not fully or not at all supported? Temperature date seems coming all right.
A more important Q is: Is there any sort of Forecast in HH that shows all correct data - native or imported from HA?

-S

It looks like you have temperature defined as individual sensors, while weather conditions are only available in forecast part of weather.home entity.
Individual sensors are supported and can be used to create forecast widgets. The forecast data inside weather entity is not supported.
One thing that might work right now - create template sensors for condition as well (just like temperature) and bind that in HH.

Sadly, that doesn’t work - only weather.home (and weather.home_hourly) shows up as a bind option for Condition ID in HH.

On a related note, if I try to set it up as a separate widget, it shows up only as a type of room or value, so no icon is displayed.

Can you share yaml config those template sensors?

sure, here it is:

sensor:
  - platform: template
    sensors:
      day1_cond:
        friendly_name: "Day1 Condition"
        value_template: "{{ state_attr('weather.home', 'forecast')[0].condition }}"
      day1_temp_high:
        friendly_name: "Day1 Temperature"
        unit_of_measurement: '°C'
        value_template: "{{ state_attr('weather.home', 'forecast')[0].temperature }}"
      day1_temp_low:
        friendly_name: "Day1 Low Temperature"
        unit_of_measurement: '°C'
        value_template: "{{ state_attr('weather.home', 'forecast')[0].templow }}"
      day2_cond:
        friendly_name: "Day2 Condition"
        value_template: "{{ state_attr('weather.home', 'forecast')[1].condition }}"
      day2_temp_high:
        friendly_name: "Day2 Temperature"
        unit_of_measurement: '°C'
        value_template: "{{ state_attr('weather.home', 'forecast')[1].temperature }}"
      day2_temp_low:
        friendly_name: "Day2 Low Temperature"
        unit_of_measurement: '°C'
        value_template: "{{ state_attr('weather.home', 'forecast')[1].templow }}"
      day3_cond:
        friendly_name: "Day3 Condition"
        value_template: "{{ state_attr('weather.home', 'forecast')[2].condition }}"
      day3_temp_high:
        friendly_name: "Day3 Temperature"
        unit_of_measurement: '°C'
        value_template: "{{ state_attr('weather.home', 'forecast')[2].temperature }}"
      day3_temp_low:
        friendly_name: "Day3 Low Temperature"
        unit_of_measurement: '°C'
        value_template: "{{ state_attr('weather.home', 'forecast')[2].templow }}"

which displays these on HA UI:

Support for forecast from HASS weather components will be added in the next release.
After that it should directly with weather.home without need for separate sensors.

thanks @igor!
releasing as beta for testing, before the stable release?

Released in HomeHabit 11.0

Thanks @igor!
Just updated and picked up the correct info/icon. One step closer to having premium :grin:

-S

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.