Hi!
I’m trying to create a “Template Weather Provider” as per this.
My code is:
template:
weather:
- name: "My PWS"
unique_id: "my_pws"
condition_template: "{{ states('weather.forecast_haus') }}"
temperature_template: "{{ states('sensor.weewx_außentemperatur') | float }}"
temperature_unit: "°C"
humidity_template: "{{ states('sensor.weewx_luftfeuchtigkeit') | float }}"
forecast_daily_template: "{{ state_attr('weather.haus', 'forecast') }}"
After reload I have this in the log:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 360, in _async_setup_platform
await asyncio.shield(task)
File "/usr/src/homeassistant/homeassistant/components/template/weather.py", line 162, in async_setup_platform
WeatherTemplate(
File "/usr/src/homeassistant/homeassistant/components/weather/__init__.py", line 269, in __call__
instance: PostInit = super().__call__(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/template/weather.py", line 186, in __init__
self._condition_template = config[CONF_CONDITION_TEMPLATE]
~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'condition_template'
I tried three different weather providers, all of them with the same result.
{{ states('weather.forecast_haus') }}
gives me snowy
in the Template Tool.
Help would be highly appreciated.