Reduce System Bridge load on server (#65794)

This commit is contained in:
Aidan Timson 2022-02-05 21:56:36 +00:00 committed by GitHub
parent 9dc158f5e0
commit acb7e24852
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 13 deletions

View File

@ -63,16 +63,20 @@ class SystemBridgeDataUpdateCoordinator(DataUpdateCoordinator[Bridge]):
await self.bridge.async_send_event( await self.bridge.async_send_event(
"get-data", "get-data",
[ [
"battery", {"service": "battery", "method": "findAll", "observe": True},
"cpu", {"service": "cpu", "method": "findAll", "observe": True},
"display", {"service": "display", "method": "findAll", "observe": True},
"filesystem", {"service": "filesystem", "method": "findSizes", "observe": True},
"graphics", {"service": "graphics", "method": "findAll", "observe": True},
"memory", {"service": "memory", "method": "findAll", "observe": True},
"network", {"service": "network", "method": "findAll", "observe": True},
"os", {"service": "os", "method": "findAll", "observe": False},
"processes", {
"system", "service": "processes",
"method": "findCurrentLoad",
"observe": True,
},
{"service": "system", "method": "findAll", "observe": False},
], ],
) )
await self.bridge.listen_for_events(callback=self.async_handle_event) await self.bridge.listen_for_events(callback=self.async_handle_event)

View File

@ -3,7 +3,7 @@
"name": "System Bridge", "name": "System Bridge",
"config_flow": true, "config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/system_bridge", "documentation": "https://www.home-assistant.io/integrations/system_bridge",
"requirements": ["systembridge==2.2.3"], "requirements": ["systembridge==2.3.1"],
"codeowners": ["@timmo001"], "codeowners": ["@timmo001"],
"zeroconf": ["_system-bridge._udp.local."], "zeroconf": ["_system-bridge._udp.local."],
"after_dependencies": ["zeroconf"], "after_dependencies": ["zeroconf"],

View File

@ -2311,7 +2311,7 @@ swisshydrodata==0.1.0
synology-srm==0.2.0 synology-srm==0.2.0
# homeassistant.components.system_bridge # homeassistant.components.system_bridge
systembridge==2.2.3 systembridge==2.3.1
# homeassistant.components.tailscale # homeassistant.components.tailscale
tailscale==0.2.0 tailscale==0.2.0

View File

@ -1423,7 +1423,7 @@ sunwatcher==0.2.1
surepy==0.7.2 surepy==0.7.2
# homeassistant.components.system_bridge # homeassistant.components.system_bridge
systembridge==2.2.3 systembridge==2.3.1
# homeassistant.components.tailscale # homeassistant.components.tailscale
tailscale==0.2.0 tailscale==0.2.0