Skip to content

Commit f036e77

Browse files
committed
Add reload updates for main components
Add /reload_updates endpoint which refreshes updates of the main components only (OS, Supervisor, Core and Plug-ins).
1 parent fd76d82 commit f036e77

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

aiohasupervisor/root.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,19 @@ async def info(self) -> RootInfo:
109109
result = await self._client.get("info")
110110
return RootInfo.from_dict(result.data)
111111

112+
async def reload_updates(self) -> None:
113+
"""Reload updates.
114+
115+
Reload main components update information (OS, Supervisor, Core and plug-ins).
116+
"""
117+
await self._client.post("reload_updates", timeout=ClientTimeout(total=300))
118+
112119
async def refresh_updates(self) -> None:
113-
"""Refresh updates."""
120+
"""Refresh updates (discouraged)."""
114121
await self._client.post("refresh_updates", timeout=ClientTimeout(total=300))
115122

116123
async def available_updates(self) -> list[AvailableUpdate]:
117-
"""Get available updates."""
124+
"""Get available updates (discouraged)."""
118125
result = await self._client.get("available_updates")
119126
return AvailableUpdates.from_dict(result.data).available_updates
120127

0 commit comments

Comments
 (0)