quickstart.py 358 B

1234567891011
  1. from hth_sdk import HTH, Control
  2. with HTH.mock() as hth:
  3. for state in hth.watch(period=0.05, count=3):
  4. action = Control(
  5. fans=[20] * 4,
  6. heaters=[30] * 4,
  7. doors={"x": 0, "y": 0, "z": 0},
  8. )
  9. result = hth.set(action)
  10. print(max(t for t in state.temperatures_c if t is not None), result.ok)