fix obsolete call to get_forecast (#1173)

This commit is contained in:
jacekowski
2024-02-11 20:15:07 +00:00
committed by GitHub
parent 858dac73d0
commit 4e36f47774

View File

@@ -209,11 +209,11 @@ class HAEntity(panel_cards.Entity):
forecast = libs.home_assistant.execute_script(
entity_name=self.entity_id,
domain='weather',
service="get_forecast",
service="get_forecasts",
service_data={
'type': forecast_type
}
).get("forecast", [])
).get(self.entity_id,{}).get("forecast", [])
if len(forecast) > pos:
forcast_pos = forecast[pos]
forcast_condition = forcast_pos.get("condition", "")