| 123456789101112131415161718 |
- from pathlib import Path
- from hth_sdk import HTH
- from hth_sdk.replay import write_sample_replay
- def main() -> None:
- path = Path(__file__).resolve().parent.parent / "hth_sdk" / "data" / "sample_replay.jsonl"
- if not path.is_file():
- write_sample_replay(path)
- with HTH.replay(path) as hth:
- state = hth.read()
- print("replay temps", [t for t in state.temperatures_c if t is not None][:4])
- print("ready", state.ready, "fresh", state.fresh)
- if __name__ == "__main__":
- main()
|