first version dataclasses

This commit is contained in:
2026-02-05 17:39:25 +01:00
parent cec56ff249
commit 7bff68dc77
2 changed files with 129 additions and 1 deletions

View File

@@ -41,14 +41,16 @@ def main() -> int:
while handler.running:
try:
now:float = time.time()
resp = projector.get(path=['status', 'storage', 'info'], params={"area":"DCP"})
if resp is not None:
print(json.dumps(resp, indent=2))
last: float = time.time()
cycle_time: float = last - now
LOGGER.debug(f"Cycle Time: {cycle_time:4.3f}")
time.sleep(INTERVAL-cycle_time)
time.sleep(INTERVAL-cycle_time)
except Exception as e:
print(f"Unexpected exception: [{e}]")
return 1