Skip to content

Commit 2e13093

Browse files
committed
Sync changes from hacore2/dwd_global_rad_api_server
1 parent 2a857ab commit 2e13093

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

custom_components/dwd_global_rad/api_client.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,18 @@ async def fetch_measurements(self, hours: int = 3):
5555
async with self.session.get(url) as response:
5656
return await response.json()
5757

58+
async def remove_location(self, name: str):
59+
url = f"{self.base_url}/locations/{name}"
60+
async with self.session.delete(url) as response:
61+
return await response.json()
62+
63+
async def get_status(self):
64+
url = f"{self.base_url}/status"
65+
async with self.session.get(url) as response:
66+
if response.status == 204:
67+
return True
68+
else:
69+
return False
70+
5871
async def close(self):
5972
await self.session.close()

custom_components/dwd_global_rad/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
"iot_class": "cloud_polling",
1010
"requirements": [],
1111
"ssdp": [],
12-
"version": "0.2.7-beta",
12+
"version": "0.2.8-beta",
1313
"zeroconf": []
1414
}

0 commit comments

Comments
 (0)