Skip to content

Commit 7031a58

Browse files
committed
Keep addons until core can be refactored
1 parent 3c0e62f commit 7031a58

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

supervisor/api/supervisor.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import voluptuous as vol
1010

1111
from ..const import (
12+
ATTR_ADDONS,
1213
ATTR_ADDONS_REPOSITORIES,
1314
ATTR_ARCH,
1415
ATTR_AUTO_UPDATE,
@@ -24,13 +25,18 @@
2425
ATTR_DIAGNOSTICS,
2526
ATTR_FORCE_SECURITY,
2627
ATTR_HEALTHY,
28+
ATTR_ICON,
2729
ATTR_IP_ADDRESS,
2830
ATTR_LOGGING,
2931
ATTR_MEMORY_LIMIT,
3032
ATTR_MEMORY_PERCENT,
3133
ATTR_MEMORY_USAGE,
34+
ATTR_NAME,
3235
ATTR_NETWORK_RX,
3336
ATTR_NETWORK_TX,
37+
ATTR_REPOSITORY,
38+
ATTR_SLUG,
39+
ATTR_STATE,
3440
ATTR_SUPPORTED,
3541
ATTR_TIMEZONE,
3642
ATTR_UPDATE_AVAILABLE,
@@ -102,6 +108,20 @@ async def info(self, request: web.Request) -> dict[str, Any]:
102108
ATTR_AUTO_UPDATE: self.sys_updater.auto_update,
103109
ATTR_DETECT_BLOCKING_IO: BlockBusterManager.is_enabled(),
104110
ATTR_COUNTRY: self.sys_config.country,
111+
# Deprecated
112+
ATTR_ADDONS: [
113+
{
114+
ATTR_NAME: addon.name,
115+
ATTR_SLUG: addon.slug,
116+
ATTR_VERSION: addon.version,
117+
ATTR_VERSION_LATEST: addon.latest_version,
118+
ATTR_UPDATE_AVAILABLE: addon.need_update,
119+
ATTR_STATE: addon.state,
120+
ATTR_REPOSITORY: addon.repository,
121+
ATTR_ICON: addon.with_icon,
122+
}
123+
for addon in self.sys_addons.local.values()
124+
],
105125
}
106126

107127
@api_process

0 commit comments

Comments
 (0)