Skip to content

Commit

Permalink
Reduce System Bridge load on server (#65794)
Browse files Browse the repository at this point in the history
  • Loading branch information
timmo001 authored Feb 5, 2022
1 parent 9dc158f commit acb7e24
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
24 changes: 14 additions & 10 deletions homeassistant/components/system_bridge/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,20 @@ async def _listen_for_events(self) -> None:
await self.bridge.async_send_event(
"get-data",
[
"battery",
"cpu",
"display",
"filesystem",
"graphics",
"memory",
"network",
"os",
"processes",
"system",
{"service": "battery", "method": "findAll", "observe": True},
{"service": "cpu", "method": "findAll", "observe": True},
{"service": "display", "method": "findAll", "observe": True},
{"service": "filesystem", "method": "findSizes", "observe": True},
{"service": "graphics", "method": "findAll", "observe": True},
{"service": "memory", "method": "findAll", "observe": True},
{"service": "network", "method": "findAll", "observe": True},
{"service": "os", "method": "findAll", "observe": False},
{
"service": "processes",
"method": "findCurrentLoad",
"observe": True,
},
{"service": "system", "method": "findAll", "observe": False},
],
)
await self.bridge.listen_for_events(callback=self.async_handle_event)
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/system_bridge/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "System Bridge",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/system_bridge",
"requirements": ["systembridge==2.2.3"],
"requirements": ["systembridge==2.3.1"],
"codeowners": ["@timmo001"],
"zeroconf": ["_system-bridge._udp.local."],
"after_dependencies": ["zeroconf"],
Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2311,7 +2311,7 @@ swisshydrodata==0.1.0
synology-srm==0.2.0

# homeassistant.components.system_bridge
systembridge==2.2.3
systembridge==2.3.1

# homeassistant.components.tailscale
tailscale==0.2.0
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1423,7 +1423,7 @@ sunwatcher==0.2.1
surepy==0.7.2

# homeassistant.components.system_bridge
systembridge==2.2.3
systembridge==2.3.1

# homeassistant.components.tailscale
tailscale==0.2.0
Expand Down

0 comments on commit acb7e24

Please sign in to comment.