Status or mode tile
A state as a text or an icon; with a command, a tap changes it, such as a thermostat’s or a charger’s mode.
In a dashboard file: "type": "status", 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": "status", "label": "Car charger", "layout": { "x": 1, "y": 1, "width": 1, "height": 1 }, "dataSource": { "connection": "demo", "params": { "device": "ev-charger", "value": "mode" } }, "options": { "command": "mode", "states": [ { "value": "pv", "text": "Solar", "icon": "solar-panel" }, { "value": "now", "text": "Now", "icon": "car-bolt", "color": "#ffcc00" }, { "value": "off", "text": "Off", "icon": "bolt-slash" } ] }}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 |
State. One of the tile’s data sources, by name, that gives a text, a number, on or off, a level, a light or a thermostat. |
command |
text | Command. What choosing a state sends, to change it; none to only show it. | |
states |
list | [] |
States. Top to bottom: the first that matches the value is shown. |
states[].value |
text, number or true or false |
Value. The value this state is, a text or a number. | |
states[].when |
condition | When. Or a condition on a number, such as value > 5. | |
states[].text |
text | Text. Shown for it; the value itself when left out. | |
states[].icon |
icon name | Icon. By its name in the icon set. | |
states[].color |
colour | Colour. Of the icon and the text. | |
states[].send |
text, number or true or false |
Send. What choosing it sends, where that is not its value. | |
states[].style |
object | Tile style. The tile’s style while it is this state. Its fields: Tile style. | |
show |
one of both, icon, text |
both |
Show. The icon and the text, or one of them. A look option: a tile style can set it. |
numberFormat |
number format | 0.## |
Number format. 0, 0.0, 0.## or #,##0. |
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