From f98d0be1dae215c3676a15e65d0cc2462ece70bb Mon Sep 17 00:00:00 2001 From: Steve Saunders Date: Tue, 22 Oct 2024 16:59:16 +1100 Subject: [PATCH] Update __init__.py --- custom_components/solcast_solar/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/solcast_solar/__init__.py b/custom_components/solcast_solar/__init__.py index 16f69977..d0809e00 100644 --- a/custom_components/solcast_solar/__init__.py +++ b/custom_components/solcast_solar/__init__.py @@ -186,7 +186,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: solcast.headers = { 'Accept': 'application/json', - 'User-Agent': 'ha-solcast-solar-integration/'+version[:version.rfind('.')-1] + 'User-Agent': 'ha-solcast-solar-integration/'+version[:version.rfind('.')] } _LOGGER.debug("Session headers: %s", solcast.headers)