Skip to content

Room climate: a reading

Room climate: a reading
<p class="name">{{ device.name }}</p><p class="reading">{{ cap.measure_temperature.value | temp: 1 }}</p>

The preview runs on a made-up sensor.climate device, so you don’t need a Homey. Edit the template or style to try something; actions don’t reach a device here.

Files

Download the package

template.liquid
<p class="name">{{ device.name }}</p><p class="reading">{{ cap.measure_temperature.value | temp: 1 }}</p>
style.css
:host {  display: grid;  align-content: center;  gap: 4px;  padding: 12px;  container-type: size;}p {  margin: 0;}.name {  font: 600 13px var(--hd-font-ui);  color: var(--hd-text-muted);}.reading {  font: var(--hd-number-weight) clamp(24px, 40cqh, 56px) / 1 var(--hd-font-display);  color: var(--hd-text);}
tiledash.json
{  "id": "@your-handle/room-climate",  "title": "Room climate",  "summary": "A Tiledash developer example.",  "version": "1.0.0",  "licence": "MIT",  "tags": [],  "kind": "widget",  "widget": {    "kind": "device",    "match": {      "requires": [        "measure_temperature"      ],      "optional": [        "measure_humidity",        "measure_co2",        "measure_battery",        "alarm_battery"      ]    },    "size": {      "default": [        3,        4      ],      "min": [        1,        1      ],      "max": [        6,        8      ]    },    "align": {      "y": "end"    },    "settings": [      {        "name": "tileTap",        "label": "The tile",        "required": false,        "group": "tap",        "type": "tap",        "gesture": "tap",        "default": {          "type": "none"        },        "hold": {          "type": "device"        },        "double": {          "type": "none"        },        "allow": [          "toggle",          "device",          "dashboard",          "flow",          "mood",          "variable",          "request"        ]      },      {        "name": "temperatureTap",        "label": "Temperature",        "required": false,        "group": "tap",        "type": "tap",        "gesture": "tap",        "default": {          "type": "none"        },        "hold": {          "type": "none"        },        "double": {          "type": "none"        },        "allow": [          "toggle",          "device",          "history",          "dashboard",          "flow",          "mood",          "variable",          "request"        ],        "capability": "measure_temperature"      },      {        "name": "humidityTap",        "label": "Humidity",        "required": false,        "group": "tap",        "type": "tap",        "gesture": "tap",        "default": {          "type": "none"        },        "hold": {          "type": "none"        },        "double": {          "type": "none"        },        "allow": [          "toggle",          "device",          "history",          "dashboard",          "flow",          "mood",          "variable",          "request"        ],        "capability": "measure_humidity"      }    ],    "basedOn": "sensor.climate"  }}

Use it

In the editor, start from the widget it’s based on and paste the template and style; or unzip the package, replace your-handle with your name in the Community and publish it. Build your first widget walks through both.