Device Tile
Connectors · DeviceTile
A smart-home device (from Google Home, Apple Home, SmartThings, tado°, Dyson, eufy, Dreame …): its reading, its state and the controls its kind needs.
kind:switch,light,thermostat,vacuum,purifier,camera,lockorsensorsets the icon.onToggleadds a switch;targetwithonTargetadds a − / + stepper for thermostats.battery(low below 15 %), quickactions,offline, and theserviceit comes from.
Living roomHeating
20.8 °CHeating · humidity 46 %
Target 21.5 °C
Ceiling lightKitchen
80 %Warm white
Robot vacuumGround floor
CleaningHallway · 18 m² to go
Battery 64%
Air purifierBedroom
AQI 12Good · night mode
Front doorOutside
Offline
Window sensorOffice
Closed
Battery 12%
Props
DeviceTile
| Prop | Type | Notes |
|---|---|---|
name | string | Required |
room? | string | |
icon? | IconName | |
kind? | "switch" | "light" | "thermostat" | "vacuum" | "purifier" | "camera" | "lock" | "sensor" | The kind sets the default icon and which controls appear. |
on? | boolean | On or off; with `onToggle` a switch. |
onToggle? | (on: boolean) => void | |
value? | ReactNode | The main reading: "21.5 °C", "Cleaning", "AQI 12". |
status? | ReactNode | A line under the value: "Heating to 22 °C", "Kitchen · 18 m² left". |
target? | number | Thermostat target in °C; with `onTarget` a − / + stepper (steps of `step`, default 0.5). |
onTarget? | (value: number) => void | |
step? | number | |
battery? | number | Battery in percent (vacuums, sensors, locks). |
actions? | { label: string; icon?: IconName; onClick?: () => void }[] | Quick actions: "Start", "Dock", "Boost". |
offline? | boolean | The device does not answer. |
service? | ServiceRef | |
className? | string | Extra class on the root element. |
style? | CSSProperties | Inline style on the root element. |