preview

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

Functions

http_get(url, headers)

Urllib implementation of the http_get HomeAssistantSource expects.

live_source()

Home Assistant as configured in src/config.py.

to_image(fb, scale)

Convert a framebuffer into a PIL image, enlarged by scale.

main()

Run the command line tool.

Module Contents

preview.ROOT
preview.SAMPLE
preview.TILES = []
preview.http_get(url, headers)

Urllib implementation of the http_get HomeAssistantSource expects.

preview.live_source()

Home Assistant as configured in src/config.py.

preview.to_image(fb, scale)

Convert a framebuffer into a PIL image, enlarged by scale.

preview.main()

Run the command line tool.