preview ======= .. py:module:: preview .. autoapi-nested-parse:: Render the dashboard on the PC and save it as PNG. uv run tools/preview.py preview.png # sample values uv run tools/preview.py --live preview.png # values from Home Assistant Attributes ---------- .. autoapisummary:: preview.ROOT preview.SAMPLE preview.TILES Functions --------- .. autoapisummary:: preview.http_get preview.live_source preview.to_image preview.main Module Contents --------------- .. py:data:: ROOT .. py:data:: SAMPLE .. py:data:: TILES :value: [] .. py:function:: http_get(url, headers) Urllib implementation of the http_get HomeAssistantSource expects. .. py:function:: live_source() Home Assistant as configured in src/config.py. .. py:function:: to_image(fb, scale) Convert a framebuffer into a PIL image, enlarged by `scale`. .. py:function:: main() Run the command line tool.