Light tile
A light that a tap switches on or off.
In a dashboard file: "type": "light", with the options below. Every tile also has the fields under Every tile.
Example
Section titled “Example”A tile, as it goes in a screen’s tiles:
{ "type": "light", "label": "Floor lamp", "layout": { "x": 1, "y": 1, "width": 1, "height": 1 }, "dataSource": { "connection": "demo", "params": { "device": "living-lamp" } }}It reads the demo home: in a dashboard with the connection "demo": { "driver": "demo", "config": {} }, it works as it is. To read a device of your own, its data source names one of your connections, with the params of that connection’s driver (Connections and data sources).
Options
Section titled “Options”| Field | Type | Default | What |
|---|---|---|---|
source |
data source name | primary |
Light. One of the tile’s data sources, by name, that gives a light, on or off or a level. |
icon |
icon name | lightbulb |
Icon. By its name in the icon set. |
Built-in styles
Section titled “Built-in styles”The styles the app offers for it, after “The dashboard’s style”. Style files says what they set.
- Centred
- Left aligned
- Compact
- Icon at the left