From b0bae69f33175c111d8b27fa7a076c868c7e5e9b Mon Sep 17 00:00:00 2001 From: SchiZzA Date: Mon, 23 Feb 2026 18:41:58 +0100 Subject: [PATCH 1/3] Update version. --- custom_components/sws12500/manifest.json | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/custom_components/sws12500/manifest.json b/custom_components/sws12500/manifest.json index 0fff70b..b30689f 100644 --- a/custom_components/sws12500/manifest.json +++ b/custom_components/sws12500/manifest.json @@ -1,15 +1,19 @@ { "domain": "sws12500", "name": "Sencor SWS 12500 Weather Station", - "codeowners": ["@schizza"], + "codeowners": [ + "@schizza" + ], "config_flow": true, - "dependencies": ["http"], + "dependencies": [ + "http" + ], "documentation": "https://github.com/schizza/SWS-12500-custom-component", "homekit": {}, "iot_class": "local_push", "issue_tracker": "https://github.com/schizza/SWS-12500-custom-component/issues", "requirements": [], "ssdp": [], - "version": "1.6.9", + "version": "1.8.1", "zeroconf": [] } From 6b8fdd5477b3a82e84b25a968b69bdb6da39cd2f Mon Sep 17 00:00:00 2001 From: SchiZzA Date: Wed, 25 Feb 2026 08:30:55 +0100 Subject: [PATCH 2/3] Accept push data for WSLink. --- custom_components/sws12500/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/custom_components/sws12500/__init__.py b/custom_components/sws12500/__init__.py index 991cd36..aa030c6 100644 --- a/custom_components/sws12500/__init__.py +++ b/custom_components/sws12500/__init__.py @@ -56,10 +56,13 @@ class WeatherDataUpdateCoordinator(DataUpdateCoordinator): self.pocasi: PocasiPush = PocasiPush(hass, config) super().__init__(hass, _LOGGER, name=DOMAIN) - async def recieved_data(self, webdata): + async def recieved_data(self, webdata: aiohttp.web.Request): """Handle incoming data query.""" _wslink = self.config_entry.options.get(WSLINK) - data = webdata.query + get_data = webdata.query + post_data = await webdata.post() + + data = dict(get_data) | dict(post_data) response = None From 96094105e0e69140b6bdba36ef17cdfd1b9b0850 Mon Sep 17 00:00:00 2001 From: SchiZzA Date: Thu, 26 Feb 2026 18:09:52 +0100 Subject: [PATCH 3/3] Added support for POST and GET methods in WSLink. Some stations sending data in POST method and some in GET method. We now support both variants. --- custom_components/sws12500/__init__.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/custom_components/sws12500/__init__.py b/custom_components/sws12500/__init__.py index aa030c6..3e5b29d 100644 --- a/custom_components/sws12500/__init__.py +++ b/custom_components/sws12500/__init__.py @@ -163,7 +163,7 @@ def register_path( if debug: _LOGGER.debug("Default route: %s", default_route) - wslink_route = hass.http.app.router.add_post( + wslink_route = hass.http.app.router.add_get( WSLINK_URL, coordinator.recieved_data if _wslink else unregistred, name="weather_wslink_url", @@ -171,6 +171,14 @@ def register_path( if debug: _LOGGER.debug("WSLink route: %s", wslink_route) + wslink_post_route = hass.http.app.router.add_post( + WSLINK_URL, + coordinator.recieved_data if _wslink else unregistred, + name="weather_wslink_post_route_url", + ) + if debug: + _LOGGER.debug("WSLink route: %s", wslink_post_route) + routes.add_route( DEFAULT_URL, default_route, @@ -181,6 +189,10 @@ def register_path( WSLINK_URL, wslink_route, coordinator.recieved_data, _wslink ) + routes.add_route( + WSLINK_URL, wslink_post_route, coordinator.recieved_data, _wslink + ) + hass_data["routes"] = routes except RuntimeError as Ex: # pylint: disable=(broad-except)