tiles¶
Tile configuration: which source value each dashboard tile shows.
Stored as JSON on flash (TILES_FILE) and edited through the web interface; config.DEFAULT_TILES applies until then. A tile is
- {“source”: “sensor.arbeitszimmer_temperatur”, “label”: “Arbeitszimmer”,
“decimals”: 1, “style”: “number”}
“source” is the ID within the data source (a Home Assistant entity ID, a
SignalK path, …); “” leaves the tile empty. “style” is one of STYLES.
Number tiles may add “trend”: the smallest change over about three hours
that shows as an arrow (see trend); without it no trend is shown.
Attributes¶
Functions¶
|
Return a checked and normalised copy of |
|
The saved tiles, or |
|
Validate and store |
|
Source IDs the tiles need, each once, in tile order. |
|
Tiles in the form layout.render expects. |
Module Contents¶
- tiles.TILES_FILE = 'tiles.json'¶
- tiles.COUNT = 6¶
- tiles.MAX_LABEL = 20¶
- tiles.MAX_SOURCE = 100¶
- tiles.MAX_DECIMALS = 3¶
- tiles.MAX_TREND = 10000¶
- tiles.NUMBER = 'number'¶
- tiles.TEXT = 'text'¶
- tiles.WEATHER = 'weather'¶
- tiles.STYLES¶
- tiles.WEATHER_STATES¶
- tiles.WEATHER_ICONS¶
- tiles.TEXT_STATES¶
- tiles.validate(tiles)¶
Return a checked and normalised copy of
tiles.- Raises:
ValueError – If something is wrong, with a German message for the web interface.
- tiles.load(default, path=TILES_FILE)¶
The saved tiles, or
defaultif none are saved or they are invalid.
- tiles.sources(tiles)¶
Source IDs the tiles need, each once, in tile order.
- tiles.to_layout(tiles)¶
Tiles in the form layout.render expects.