board_tiles

Fetch and change the tile settings of the board over the WLAN.

uv run tools/board_tiles.py pull [–file tiles.json] uv run tools/board_tiles.py push [–file tiles.json]

pull stores the board’s tiles and warning sources in a local JSON file; edit it, then push sends it through the same API the web interface uses (POST /api/tiles), so the board checks it in the same way and redraws at once. A sleeping board is woken through the maintenance switch (see wake), so the command can be left running unattended. The file holds entity IDs of your installation and is ignored by git.

Attributes

Functions

get_settings(base)

The board's tiles and warning sources, or None if it does not answer.

post_settings(base, settings)

Send the settings; return what the board saved.

load_file(path)

Read and check settings from path before the board is woken.

save_file(path, settings)

Write settings to path, readable for editing.

main()

Run the command line tool.

Module Contents

board_tiles.ROOT
board_tiles.DEFAULT_FILE
board_tiles.get_settings(base)

The board’s tiles and warning sources, or None if it does not answer.

board_tiles.post_settings(base, settings)

Send the settings; return what the board saved.

Raises:

SystemExit – With the board’s message if it rejects the settings.

board_tiles.load_file(path)

Read and check settings from path before the board is woken.

Raises:

SystemExit – If the file is missing or the settings are invalid.

board_tiles.save_file(path, settings)

Write settings to path, readable for editing.

board_tiles.main()

Run the command line tool.