From 65be5ffeb0696edebadf5c000fcfc577d5e57a73 Mon Sep 17 00:00:00 2001 From: Johannes <29555657+joBr99@users.noreply.github.com> Date: Thu, 31 Jul 2025 20:37:31 +0200 Subject: [PATCH] implements #1351 --- apps/nspanel-lovelace-ui/luibackend/pages.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/apps/nspanel-lovelace-ui/luibackend/pages.py b/apps/nspanel-lovelace-ui/luibackend/pages.py index 401e3f76..35d8c499 100644 --- a/apps/nspanel-lovelace-ui/luibackend/pages.py +++ b/apps/nspanel-lovelace-ui/luibackend/pages.py @@ -387,15 +387,21 @@ class LuiPagesGen(object): elif entityType == "weather": entityTypePanel = "text" unit = get_attr_safe(entity, "temperature_unit", "") + rt = None + if type(item.stype) == str: + spintstr = item.stype.split(":") + rt = spintstr[0] + item.stype = int(spintstr[1]) if type(item.stype) == int: bits = get_attr_safe(entity, "supported_features", 0b0) - rt = "daily" - if bits & 0b001: #FORECAST_DAILY + if not rt: rt = "daily" - elif bits & 0b010: #FORECAST_HOURLY - rt = "hourly" - elif bits & 0b100: #FORECAST_TWICE_DAILY - rt = "twice_daily" + if bits & 0b001: #FORECAST_DAILY + rt = "daily" + elif bits & 0b010: #FORECAST_HOURLY + rt = "hourly" + elif bits & 0b100: #FORECAST_TWICE_DAILY + rt = "twice_daily" results = apis.ha_api.call_service( "weather/get_forecasts", target={"entity_id": entityId}, service_data={"type": rt}