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(
"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)

View file

@ -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"],

View file

@ -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

View file

@ -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