Get forecasts from large to small (#17755)

This commit is contained in:
Bram Kragten 2023-08-31 14:32:30 +02:00 committed by GitHub
parent 93846a2867
commit 1825749036
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -649,11 +649,11 @@ export const getDefaultForecastType = (stateObj: HassEntityBase) => {
if (supportsFeature(stateObj, WeatherEntityFeature.FORECAST_DAILY)) {
return "daily";
}
if (supportsFeature(stateObj, WeatherEntityFeature.FORECAST_HOURLY)) {
return "hourly";
}
if (supportsFeature(stateObj, WeatherEntityFeature.FORECAST_TWICE_DAILY)) {
return "twice_daily";
}
if (supportsFeature(stateObj, WeatherEntityFeature.FORECAST_HOURLY)) {
return "hourly";
}
return undefined;
};