Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config with Openweather as external weather entity is broken since 1.5.1 #1344

Open
PetziAt opened this issue Apr 25, 2024 · 3 comments
Open
Assignees
Labels
new bug incoming bug issue

Comments

@PetziAt
Copy link

PetziAt commented Apr 25, 2024

Description

Since 1.5.1 the Openweather isn't working for the external weather entity.

Steps to Reproduce

  1. Configure OpenWeatherMap as external weather entity.

Expected behavior:

A working configuration as 1.5.0 or ealier.

Actual behavior:

Traceback (most recent call last): File "/config/custom_components/better_thermostat/climate.py", line 856, in startup await self._trigger_check_weather(None) File "/config/custom_components/better_thermostat/climate.py", line 399, in _trigger_check_weather await check_weather(self) File "/config/custom_components/better_thermostat/utils/weather.py", line 40, in check_weather _call_for_heat_weather = await check_weather_prediction(self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/better_thermostat/utils/weather.py", line 87, in check_weather_prediction forecasts = await self.hass.services.async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2543, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2580, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 971, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1043, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/weather/__init__.py", line 1061, in async_get_forecasts_service raise_unsupported_forecast(weather.entity_id, forecast_type) File "/usr/src/homeassistant/homeassistant/components/weather/__init__.py", line 1022, in raise_unsupported_forecast raise HomeAssistantError( homeassistant.exceptions.HomeAssistantError: Weather entity 'weather.openweathermap' does not support 'daily' forecast

Versions

BT 1.5.1
HA

Additional Information

@KartoffelToby
Copy link
Owner

@dasadi can help here :)

I'll take a look too, if there are different service calls

@dengi76
Copy link

dengi76 commented Apr 26, 2024

I confirm!!! Doesn't work for me either!!! I had to roll back!

@dasadi
Copy link
Contributor

dasadi commented Apr 27, 2024

When selecting hourly forecast type for openweathermap, only the FORECAST_HOURLY WeatherEntityFeature will be provided, which means we can only request an hourly forecast and no daily.
I will work on it to dynamically call the service with the correct options.

@KartoffelToby What is the idea for the forecast if we have multiple datapoints per day? Should we look at the forecast for ex. 5am in the morning or max temp for the day? If not, which other strategy should we use for selecting the temperature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new bug incoming bug issue
Projects
None yet
Development

No branches or pull requests

4 participants