Components

Components

The hd-* elements a template can use, with what each takes. The built-in widgets are made of exactly these, so anything they do, yours can too.

Basics

Icons, pictures, numbers, times and tooltips.

hd-icon

An icon from the icon registry, by semantic name, or any Phosphor icon.

AttributeWhat it is
namerequiredSemantic icon name, e.g. device.light or ui.close, or a Phosphor icon as ph.<name> with underscores, e.g. ph.swimming_pool.
weightIcon weight. One of regular, fill, duotone, bold. Default regular.
sizeCSS size, e.g. 24px or 1.5em. Default 1em.
labelAccessible label; without it the icon is decorative.
<hd-icon name="device.light"></hd-icon>

hd-image

A picture: a web address (src, http or https only), one of the device’s own images by name (image, e.g. album art as albumart, a camera’s snapshot) or a picture the user uploaded (upload, its id). It is fetched without referrer or cookies, loads lazily, fades in, and shows the fallback icon while it loads, when there is none and when it fails; grey on e-ink. It fills its parent, so size the element (or its parent) in CSS.

AttributeWhat it is
srcA picture on the web: an https: or http: address; anything else is ignored.
imageOne of the device’s images by name, e.g. albumart or snapshot.
uploadA picture the user uploaded, by its id (the custom tile’s pictures). Shown only to its owner; the page fetches it and hands over an address, so the widget never sees a link.
refreshWhat the picture depends on (the track); when it changes the picture is fetched again, for apps that replace a picture without saying so.
deviceDevice id; defaults to the widget’s own device.
fitFill the box and crop, or fit all of it inside. One of cover, contain. Default cover.
fallbackSemantic icon shown while loading, when there is no picture, or when it fails.
altDescribes the picture; without it the picture is decorative.
<hd-image></hd-image>

hd-value

A live number that counts to new values (or snaps, on e-ink).

AttributeWhat it is
valuerequiredThe number to show. Or a live capability of any device, followed: {{ settings.x.cap.measure_power }}.
decimalsDigits after the decimal point. Default 0.
unitUnit shown after the number, smaller.
<hd-value value="{{ cap.measure_power }}"></hd-value>

hd-relative-time

Time since a moment, kept up to date (“4 min ago”).

AttributeWhat it is
datetimerequiredISO timestamp.
<hd-relative-time datetime=""></hd-relative-time>

hd-clock

The time or the date, ticking on its own. AM/PM and seconds are parts: ::part(period), ::part(seconds).

AttributeWhat it is
showWhat to show. One of time, date. Default time.
secondsShow seconds (not on e-ink). Default false.
hour-cycle12 or 24 hours; auto follows the browser’s language. One of auto, 12, 24. Default auto.
date-styleFor the date: “Tuesday 6 October”, “6 Oct” or “Tuesday”. One of long, short, weekday. Default long.
<hd-clock></hd-clock>

hd-progress

How far a track is: a thin bar with the time played and the time left, counting on every second while it plays (players report their position only now and then). Parts: ::part(bar), ::part(times).

AttributeWhat it is
positionrequiredSeconds played when it was last reported. Or a live capability of any device, followed: {{ settings.x.cap.measure_power }}.
durationrequiredLength in seconds. Or a live capability of any device, followed: {{ settings.x.cap.measure_power }}.
atWhen the position was reported (ISO), to count on from.
playingPlaying: count on by itself. Default false.
<hd-progress position="{{ cap.measure_power }}" duration="{{ cap.measure_power }}"></hd-progress>

hd-tip

Explains what it wraps in a small bubble in the theme’s colours, instead of the browser’s own title tooltip: on hover, on focus and on a tap (a tap on it never reaches the tile’s own tap). The bubble stays inside the window and isn’t cut off by the tile. E.g. <hd-tip text="{{ m.estimatedText }}">≈</hd-tip>.

AttributeWhat it is
textrequiredWhat the bubble says.
<hd-tip text=""></hd-tip>

Controls

Things to tap, slide and turn, bound to a device.

hd-toggle

on change

An on/off switch bound to a boolean capability with bind (or the explicit form: value with data-hd-on-change).

AttributeWhat it is
bindThe capability it is bound to, e.g. {{ settings.light.cap.dim }} (the whole capability, no .value): it shows its value, takes min, max and step from it, and sends changes back (shown at once, sprung back if refused, range checked). A device that is unavailable shows its last value, disabled.
valueThe explicit form instead of bind: what it shows, e.g. {{ cap.onoff.value }} (or a live capability, followed); a change only goes to data-hd-on-change, which decides what it does. Without a handler it can’t be changed.
toneColour when on. One of lit, accent. Default lit.
labelAccessible label.
<hd-toggle bind="{{ cap.onoff }}" label="Brightness"></hd-toggle>

hd-slider

on change

A slider bound to a numeric capability (dim, target temperature, volume…) with bind (or the explicit form: value with data-hd-on-change). It sends the value once, on release.

AttributeWhat it is
bindThe capability it is bound to, e.g. {{ settings.light.cap.dim }} (the whole capability, no .value): it shows its value, takes min, max and step from it, and sends changes back (shown at once, sprung back if refused, range checked). A device that is unavailable shows its last value, disabled.
valueThe explicit form instead of bind: what it shows, e.g. {{ cap.dim.value }} (or a live capability, followed); a change only goes to data-hd-on-change, which decides what it does. Without a handler it can’t be changed.
minMinimum; defaults to the capability’s.
maxMaximum; defaults to the capability’s.
stepStep; defaults to the capability’s.
toneTrack colour; warmth is a cool-to-warm track for colour temperature, muted a dimmed one for something switched off. One of accent, lit, cool, warmth, muted. Default accent.
labelAccessible label.
<hd-slider bind="{{ cap.dim }}" label="Brightness"></hd-slider>

hd-dial

on change

A 270° dial you drag to set a numeric capability (target temperature): the knob is the value, an optional dot shows a second value (the room), and the value sits large in the middle. A value changed from elsewhere (the − and + buttons, the Homey, another screen) springs into place with one small overshoot; under your finger it follows exactly. Reduced motion and e-ink: it moves at once.

AttributeWhat it is
bindThe capability it is bound to, e.g. {{ settings.light.cap.dim }} (the whole capability, no .value): it shows its value, takes min, max and step from it, and sends changes back (shown at once, sprung back if refused, range checked). A device that is unavailable shows its last value, disabled.
valueThe explicit form instead of bind: what it shows, e.g. {{ cap.target_temperature.value }} (or a live capability, followed); a change only goes to data-hd-on-change, which decides what it does. Without a handler it can’t be changed.
minMinimum; defaults to the capability’s.
maxMaximum; defaults to the capability’s.
stepStep; defaults to the capability’s.
markerA second value shown as a dot, e.g. the room temperature. Or a live capability of any device, followed: {{ settings.x.cap.measure_power }}.
labelSmall text above the value, e.g. “Heat to”.
captionSmall text below the value, e.g. “Now 21.0°”.
unitShown after the value, e.g. °.
decimalsDigits after the decimal point. Default 1.
toneColours of the arc: heating runs cool to warm, cooling warm to cool. One of heat, cool, neutral. Default heat.
<hd-dial bind="{{ cap.target_temperature }}" label="Brightness"></hd-dial>

hd-trigger

Starts a flow or sets a mood when tapped, and shows how it went: its phase attribute is idle, running, done or failed, so the template can style each moment. It also plays the motion kit on itself: a pop when it worked, a shake when it failed (reduced motion fades, e-ink shows nothing). Its content is whatever the template puts inside.

AttributeWhat it is
actionrequiredWhat a tap does. One of flow, mood.
targetrequiredThe id of the flow or mood.
labelAccessible name, e.g. “Start Goodnight”.
confirmA question to ask first, e.g. “Run Leaving home?”.
disabledShown but not tappable, e.g. a flow disabled in Homey.
<hd-trigger action="flow" target=""></hd-trigger>

Charts and gauges

History and readings as lines, bars, rings and gauges.

hd-sparkline

A small history line with live updates, an hd-series inside per line (up to 3, any devices, also for one line); no axes, legend or tooltip, so label the lines around it. Lines with the same unit share a scale.

AttributeWhat it is
rangeHow far back: 1h, 6h, 24h, 7d, 30d, 1y. Default 24h.
resolutionBucket size; a larger one calms a busy line down to averages. One of auto, raw, 1m, 5m, 15m, 1h, 1d. Default auto.
aggregateHow buckets are combined; each hd-series can have its own. One of avg, min, max, last, delta. Default avg.
variantA line, a filled area, columns, stacked columns, or steps; each hd-series can have its own. One of line, area, bar, stacked, step. Default area.
smoothGently curved lines. Default false.
liveKeep adding live points. Default true.
<hd-sparkline range="24h">  <hd-series bind="{{ cap.measure_power }}"></hd-series></hd-sparkline>

hd-chart

A history chart with an hd-series inside per line (up to 8, any devices, also for one line); can sit behind the widget content as a background. Lines with the same unit share an axis, a second unit goes on the right; from two lines on it has a legend, and its tooltip lists every line at that moment.

AttributeWhat it is
rangeHow far back: 1h, 6h, 24h, 7d, 30d, 1y. Default 24h.
fromStart time (ISO), instead of range.
toEnd time (ISO).
resolutionBucket size. One of auto, raw, 1m, 5m, 15m, 1h, 1d. Default auto.
aggregateHow buckets are combined; each hd-series can have its own. One of avg, min, max, last, delta. Default avg.
variantChart style: a line, a filled area, columns (side by side for several lines), stacked columns, or steps; each hd-series can have its own, and with several lines only the first is an area. One of line, area, bar, stacked, step. Default area.
placementInline, or behind the content. One of inline, background. Default inline.
smoothGently curved lines. Default false.
liveKeep adding live points. Default true.
<hd-chart range="24h">  <hd-series bind="{{ cap.measure_power }}"></hd-series></hd-chart>

hd-series

One line of an hd-chart (up to 8) or hd-sparkline (up to 3), written inside it, also for a chart of one line; draws nothing itself. Lines with the same unit share an axis, a different unit goes on the right (two axes at most); from two lines on the chart has a legend, and its tooltip lists every line at that moment with its unit. A line whose device is unavailable steps back and says so; lines over the limit are left out (the editor’s preview and its problems say so, a dashboard doesn’t). A readings setting fills them with a {% for %}: <hd-series bind="{{ r.cap }}" label="{{ r.label }}">.

AttributeWhat it is
bindrequiredThe capability it draws, e.g. {{ settings.solar.cap.measure_power }} (the whole capability, no .value); or readings added up and subtracted, each signed: {{ a }} +{{ b }} -{{ c }}.
labelIts name in the legend and tooltip; the capability’s title by default (its device’s name where two lines would read the same).
colorA theme colour name or #rrggbb; the theme’s chart colours in order by default (repeats are dashed).
aggregateHow a bucket’s values combine: the average, lowest, highest or last; delta is a meter’s use per bucket. The chart’s by default. One of avg, min, max, last, delta.
variantA line, a filled area, columns or steps. The chart’s by default; with several lines only the first is an area. One of line, area, bar, step.
axisauto: the same unit shares an axis, a second unit goes right; or keep it left or right. One of auto, left, right. Default auto.
<hd-chart range="24h">  <hd-series bind="{{ settings.solar.cap.measure_power }}" label="Solar" color="lit"></hd-series>  <hd-series bind="{{ settings.outside.cap.measure_temperature }}" label="Outside" variant="line"></hd-series></hd-chart>

hd-history

The history of one or more readings as a tile of its own: a chart with range chips (6 hours to a year), what to show (a meter’s usage, or the average, lowest or highest), detail, and with several readings a total, an average or a line each, and the totals under it. It shows what fits its size, keeps up to date (every minute while visible, every five on e-ink) and says so when a reading isn’t recorded or the plan keeps less than the range. What it is shown with (range, what to show, detail) can be changed on the tile and is kept only while the page is open. Its content (an icon, a name, the readings’ names) becomes its heading; the attributes only say what it starts with.

AttributeWhat it is
readingsrequiredUp to six readings separated by commas, each a live capability reference (a readings setting’s {{ r.cap }}, @<device>/<capability>), device-id/capability (3f2c…/measure_power), or one of the Homey’s energy and price values as @host/<key> (@host/prices:now, from a readings setting with energy): amounts as bars, a price as steps.
namesA name per reading for the legend and the totals, separated by commas.
rangeHow far back it starts: 6 hours, 12 hours, 24 hours, 7, 30 days or a year. One of 6h, 12h, 24h, 7d, 30d, 1y. Default 24h.
viewWhat it starts with: usage (a meter’s rise per hour or day), reading (the meter itself), avg, min, max; auto is usage for meters and the average for the rest. One of auto, usage, reading, avg, min, max. Default auto.
detailHow fine the line is: every detail (auto), or hourly or daily averages. One of auto, 1h, 1d. Default auto.
combineSeveral readings as one figure (their sum or average, which can still be split into a line each on the tile) or a line each. One of lines, sum, average. Default lines.
colorA theme colour name or #rrggbb for one reading or a total; lines get the theme’s chart colours.
<hd-history readings=""></hd-history>

hd-gauge

A 270° dial filled up to a value within a range (target temperature, battery, power); the centre is left free for the template.

AttributeWhat it is
valueWhat it fills up to, e.g. {{ cap.target_temperature }} (its range then comes from the capability) or a number. Or a live capability of any device, followed: {{ settings.x.cap.measure_power }}.
minMinimum; defaults to the capability’s, else 0.
maxMaximum; defaults to the capability’s, else 100.
markerA second value shown as a dot on the dial, e.g. the current temperature. Or a live capability of any device, followed: {{ settings.x.cap.measure_power }}.
colorA theme colour name: accent, lit, cool, good, warn, danger, chart-1…chart-6. One of accent, lit, cool, good, warn, danger, chart-1, chart-2, chart-3, chart-4, chart-5, chart-6.
<hd-gauge></hd-gauge>

hd-ring

A progress ring for a fraction (battery, solar share, cover position).

AttributeWhat it is
valuerequiredCurrent value, out of max. A live capability without a max is fitted into its own range. Or a live capability of any device, followed: {{ settings.x.cap.measure_power }}.
maxValue of a full ring. Default 1.
colorA theme colour name: accent, lit, cool, good, warn, danger, chart-1…chart-6. One of accent, lit, cool, good, warn, danger, chart-1, chart-2, chart-3, chart-4, chart-5, chart-6.
<hd-ring value="{{ cap.measure_power }}"></hd-ring>

hd-bars

A period as bars against the previous one: each value a bar in its colour with a soft glow, the previous period’s value behind it as an outline, the running bar (current) drawn as “so far”, values below zero hanging under the line. Hover or tap a bar to read both. Bars grow in at full motion only; flat on e-ink. For any series of numbers: an hour by hour day, a week, a month.

AttributeWhat it is
valuesrequiredThe values, separated by commas, e.g. {{ energy.electricity.hours.values }}.
previousThe previous period’s values, drawn behind as outlines, e.g. {{ energy.electricity.hours.previous }}.
labelsA label per bar, separated by commas (Mon,Tue…); some are left out when they don’t fit.
currentIndex of the running bar (0 first), drawn as so far; the ones after it are still to come.
colorA theme colour name. One of accent, lit, cool, good, warn, danger, chart-1, chart-2, chart-3, chart-4, chart-5, chart-6. Default accent.
unitUnit for the values read out, e.g. kWh.
legendWhat the bars and the outlines are, separated by a comma, e.g. “This week,Last week”: drawn above the bars and read in the tooltip.
namesThe same words for the tooltip only, without drawing a legend: rows of bars under each other name theirs this way, e.g. {{ energy.periods.week.electricity.bars.names }}.
axisWhether the labels show under the bars; none keeps them for the tooltip only, so of rows under each other only the last carries them. One of labels, none. Default labels.
<hd-bars values="{{ energy.electricity.compare.week.bars.values }}" previous="{{ energy.electricity.compare.week.bars.previous }}" labels="{{ energy.electricity.compare.week.bars.labels }}" current="{{ energy.electricity.compare.week.bars.current }}" unit="kWh"></hd-bars>

Animated devices

Pictures of devices that move with them: a bulb that blooms, a lock that springs.

hd-bulb

A light bulb that blooms on and fades off, and spills its light around it, wider and stronger the brighter it is (the tile clips it). Reduced motion fades; e-ink snaps without a glow.

AttributeWhat it is
onWhether it is lit; a change blooms it on or fades it off. Or a live capability of any device, followed: {{ settings.x.cap.onoff }}.
levelBrightness 0–1, e.g. {{ cap.dim.value }}; missing is full. Or a live capability of any device, followed and fitted into its own range: {{ cap.measure_battery }} (0–100) just works.
sizeCSS size, e.g. 18px; or set --size. Default 1em.
labelAccessible label; otherwise “On” or “Off”.
<hd-bulb></hd-bulb>

hd-socket

A plug and socket that snap together when it switches on and pull apart when it switches off, with a short pulse from the joint when power starts to flow. Reduced motion fades; e-ink snaps.

AttributeWhat it is
onIts state; a change snaps it in or pulls it out. Or a live capability of any device, followed: {{ settings.x.cap.onoff }}.
powerWatts, e.g. {{ cap.measure_power.value }}; starting to flow pulses once. Or a live capability of any device, followed: {{ settings.x.cap.measure_power }}.
sizeCSS size, e.g. 18px; or set --size. Default 1em.
labelAccessible label; otherwise “On” or “Off”.
<hd-socket></hd-socket>

hd-lock

A lock that locks and unlocks with a springy motion (the shackle drops in and bounces, swings open). While busy the shackle wiggles; when a busy lock ends where it began (refused, or never answered) it shakes.

AttributeWhat it is
lockedtrue is locked, false unlocked; a change plays the motion. Or a live capability of any device, followed: {{ settings.x.cap.onoff }}. Default true.
busyA command is on its way to the Homey.
sizeCSS size, e.g. 48px; or set --size. Default 1em.
labelAccessible label; otherwise “Locked” or “Unlocked”.
<hd-lock></hd-lock>

hd-motion

The motion kit around anything: plays a motion when value changes, wiggles while busy, and shakes when a command ends with value where it began (refused, or never answered). Follows the motion level: reduced motion only fades (a pulse while busy), e-ink shows nothing.

AttributeWhat it is
valueWhat it follows, e.g. {{ cap.onoff.value }}; a change plays play.
playWhat a change of value plays. One of settle, success, press, refused, none. Default settle.
busyA command is on its way: present, or true (false is not busy), e.g. {% if pending.onoff %} busy{% endif %} or busy="{{ b.busy }}".
refusedWhat a refused command plays. One of refused, settle, none. Default refused.
pressA tap on it plays the press motion.
blockTakes the full width instead of fitting its content.
<hd-motion></hd-motion>

hd-door

A door in its frame for a contact sensor: it swings open on its hinge (past where it stops, and back) with the light of the room beyond showing through, and swings shut with a small bounce. Its colour is the text colour around it. Reduced motion: no swing; e-ink snaps.

AttributeWhat it is
openWhether it is open; a change swings it. Or a live capability of any device, followed: {{ settings.x.cap.onoff }}.
sizeIts width (CSS), e.g. 40px; or set --size. Default 40px.
labelAccessible label; otherwise “Open” or “Closed”.
<hd-door></hd-door>

hd-cover

A window with blinds or curtains, or a garage door, that moves: blinds roll up into the top, curtains bunch at the sides, a sectional garage door rolls up with its light blinking. A new position springs into place (a garage door settles with a thud as it closes); while the motor runs the slats travel, the curtains sway, the garage light blinks. Reduced motion: no travel; e-ink snaps.

AttributeWhat it is
kindWhat covers it. One of blinds, curtains, garage. Default blinds.
positionHow far it is open, 0–1, e.g. {{ cap.windowcoverings_set.value }}. Or a live capability of any device, followed and fitted into its own range: {{ cap.measure_battery }} (0–100) just works.
movingThe motor: up, down or idle. One of up, down, idle.
sizeIts width (CSS), e.g. 64px; or set --size. Default 64px.
<hd-cover></hd-cover>

hd-alert

A sensor or alarm that says it went off, with its own icon: motion pings like a radar (then calmly while it still sees movement), smoke, CO and the siren shake and pulse while on, water ripples under a bobbing drop, a doorbell swings and rings twice. Its colour is the text colour around it. Reduced motion: a still halo; e-ink snaps.

AttributeWhat it is
kindWhich sensor or alarm. One of motion, smoke, co, water, siren, doorbell. Default motion.
activeWhether it is going off, e.g. {{ cap.alarm_smoke.value }}. Or a live capability of any device, followed: {{ settings.x.cap.onoff }}.
sizeCSS size, e.g. 30px; or set --size. Default 30px.
labelAccessible label; otherwise “Active” or “Quiet”.
<hd-alert></hd-alert>

hd-machine

A heat pump, heater, pump, fan or air conditioner that answers being switched (a fan spins up or winds down, a pump hums, a heater’s flame blooms), then rests. While it works it shows it in colour with a soft glow (warm heating, cool cooling, accent running) and keeps a calm motion going: a fan turns with its speed, a heat pump’s fan turns, a heater’s flame flickers, a pump pulses, an air conditioner breathes. Reduced motion: no motion; e-ink snaps.

AttributeWhat it is
kindWhich machine (its icon and motion). One of fan, pump, heatpump, heater, aircon. Default fan.
onIts state; a change plays the switch motion once. Or a live capability of any device, followed: {{ settings.x.cap.onoff }}.
workingWhat it is doing while on; empty when it rests. One of heating, cooling, running, .
speedA fan’s speed 0–1, e.g. {{ cap.dim.value }}. Or a live capability of any device, followed and fitted into its own range: {{ cap.measure_battery }} (0–100) just works.
sizeCSS size, e.g. 18px; or set --size. Default 1em.
labelAccessible label; otherwise “On” or “Off”.
<hd-machine></hd-machine>

hd-appliance

A washing machine, dryer or dishwasher whose own moving part shows it works: a washer’s drum turns and returns, a dryer’s tumbles on, a dishwasher’s spray bobs. Done it rests in the good colour; off it is dimmed. Reduced motion: still; e-ink snaps.

AttributeWhat it is
kindWhich appliance. One of washer, dryer, dishwasher, icon. Default washer.
iconFor kind="icon": the registry icon to draw, a ring circling it while it runs.
staterunning, done or off. One of running, done, off. Default off.
sizeIts size (CSS), e.g. 56px; or set --size. Default 56px.
labelAccessible label; otherwise the state in words.
<hd-appliance></hd-appliance>

hd-ambience

A living background for a tile that heats or cools: soft reds and ambers rising like warm air, or ice blues sinking and drifting. Stronger the harder it works. Position it behind the content; it never takes a tap. Reduced motion: still colour; e-ink: nothing.

AttributeWhat it is
modeWhat the tile is doing; anything else fades it away. One of heating, cooling, .
strengthHow hard it works, 0–1 (e.g. how far from the target). Or a live capability of any device, followed and fitted into its own range: {{ cap.measure_battery }} (0–100) just works. Default 0.6.
<hd-ambience></hd-ambience>

hd-battery

A battery whose charge fills it from the bottom: while it charges a wave rolls on the surface, while it gives power a shimmer runs down through it; low (under 20%) it turns warn. Reduced motion: still; e-ink snaps.

AttributeWhat it is
levelHow full, 0–1. Or a live capability of any device, followed and fitted into its own range: {{ cap.measure_battery }} (0–100) just works.
stateWhat it does. One of charging, giving, idle. Default idle.
sizeIts width (CSS), e.g. 28px; or set --size. Default 28px.
labelAccessible label; otherwise the level and state.
<hd-battery></hd-battery>

hd-charge

An EV charger’s bolt: rings pulse out while it charges (faster with more power), in while the car gives power back; paused or plugged in it rests. Reduced motion: still; e-ink snaps.

AttributeWhat it is
statecharging, giving, paused, plugged or unplugged. A live evcharger_charging_state is read in these words (evcharger_charging as charging or plugged). Or a live capability of any device, followed: {{ settings.x.cap.evcharger_charging_state }}. One of charging, giving, paused, plugged, unplugged. Default unplugged.
powerWatts; how fast the pulses go (1–11 kW). Or a live capability of any device, followed: {{ settings.x.cap.measure_power }}.
sizeCSS size, e.g. 36px; or set --size. Default 36px.
labelAccessible label; otherwise the state in words.
<hd-charge></hd-charge>

hd-equalizer

Small equaliser bars that dance while a media player plays and settle low when it pauses. Reduced motion and e-ink: still, at play heights.

AttributeWhat it is
playingWhether it plays. Or a live capability of any device, followed: {{ settings.x.cap.onoff }}.
sizeWidth and height (CSS), e.g. 18px. Default 18px.
<hd-equalizer></hd-equalizer>

hd-playpause

A play/pause button face that turns from one into the other; it shows what a tap does. Reduced motion: a fade; e-ink snaps.

AttributeWhat it is
playingWhether it plays (then it shows pause). Or a live capability of any device, followed: {{ settings.x.cap.onoff }}.
sizeCSS size, like hd-icon’s. Default 1em.
<hd-playpause></hd-playpause>

Energy

Energy flowing through the house and prices through the day.

hd-energy-flow

Where power goes right now: solar, the grid, the home battery and the car around the house, with dots flowing along the lines (arrows on e-ink and with reduced motion). A part left empty is not drawn.

AttributeWhat it is
gridWatts from the grid; below zero is going back to it. Or a live capability of any device, followed: {{ settings.x.cap.measure_power }}.
solarWatts the solar panels make. Or a live capability of any device, followed: {{ settings.x.cap.measure_power }}.
batteryWatts into the home battery; below zero is the battery giving power. Or a live capability of any device, followed: {{ settings.x.cap.measure_power }}.
battery-chargeThe home battery’s charge, 0–100. Or a live capability of any device, followed: {{ settings.x.cap.measure_power }}.
carWatts going into the car. Or a live capability of any device, followed: {{ settings.x.cap.measure_power }}.
car-chargeThe car’s charge, 0–100. Or a live capability of any device, followed: {{ settings.x.cap.measure_power }}.
priceThe electricity price now, as text for the grid’s caption, e.g. {{ prices.now.text }}.
price-levelWhere the price now sits, e.g. {{ prices.now.level }}: the grid’s line takes its colour while power comes from it; below zero, power going back to the grid turns red. One of negative, cheap, normal, high.
<hd-energy-flow></hd-energy-flow>

hd-price-bars

Electricity prices as bars in their colours, cheap to expensive on each day’s own range (cheap, normal, expensive; below zero its own colour, drawn under the zero line), the slot now marked and the past dimmed. A band can mark the cheapest hours (highlight-*), a bracket another stretch, like a car’s charging (mark-*); slots not published yet (tomorrow before ~13:00) wait as a dashed outline with pending on it. Hover or tap a bar to read its price. The colours follow the theme (--hd-price-*), as greys on e-ink. Bars grow in at full motion only. For today and tomorrow: values="{{ prices.bars.values }}" start="{{ prices.bars.start }}" step="{{ prices.bars.step }}" now="{{ prices.now.start }}".

AttributeWhat it is
valuesrequiredThe prices per slot, separated by commas, e.g. {{ prices.bars.values }} or {{ prices.today.values }}.
levelsEach slot’s level (negative, cheap, normal, high), separated by commas, e.g. {{ prices.bars.levels }}, so the colours are the ones the rest of the widget says; worked out from the values (against each day’s average) when left out.
startWhen the first slot starts (ISO), e.g. {{ prices.bars.start }}.
stepMinutes per slot: 60, or 15. Default 60.
slotsHow many slots to make room for; past the values they wait for their prices (tomorrow’s 24 before they are out).
pendingSaid over the slots still waiting, e.g. {{ prices.bars.pending }}.
nowThe moment now (ISO); its slot is marked, the ones before dimmed. Defaults to the clock.
fromShow from this moment (ISO) on, e.g. {{ prices.now.start }}, instead of from start.
spanHours to show from from; all by default.
highlight-fromStart of a band behind the bars (ISO), e.g. the cheapest hours.
highlight-toEnd of the band (ISO).
highlight-labelSaid on the band, e.g. “Cheapest 3 h”.
mark-fromStart of a bracket under the bars (ISO), e.g. when the car charged.
mark-toEnd of the bracket (ISO).
mark-labelSaid by the bracket, e.g. “Charged”.
currencySymbol for the prices read out, e.g. €. Default €.
time-zoneThe clock the hours are told by, e.g. {{ prices.timeZone }}; the screen’s by default.
compactNo hour labels or read-out: bars only, for small spaces. Default false.
<hd-price-bars values="{{ prices.bars.values }}" levels="{{ prices.bars.levels }}" start="{{ prices.bars.start }}" step="{{ prices.bars.step }}" now="{{ prices.now.start }}" slots="{{ prices.bars.slots }}" pending="{{ prices.bars.pending }}"></hd-price-bars>

hd-flow-rate

A live flow as a small moving glyph: water drops falling, a gas flame flickering, power pulsing, quicker and fuller as more flows; still and faint at zero. Reduced motion and e-ink: still, with its fullness shown.

AttributeWhat it is
kindWhat flows. One of water, gas, power. Default water.
rateHow much flows now, e.g. {{ energy.water.flow.value }}. Or a live capability of any device, followed: {{ settings.meter.cap.measure_water }}.
maxA flow this big is full speed. Default 10.
sizeCSS size, e.g. 18px; or set --size. Default 1em.
labelAccessible label; otherwise the rate.
<hd-flow-rate></hd-flow-rate>

Maps, weather and cameras

Places on a map, the sky outside and a camera’s picture.

hd-map

A map with a pin for each hd-map-pin inside it; pins glide when they move and the map follows them, framing all or one. Light or dark with the theme. Reduced motion jumps; e-ink is a still map in greys. Lists the places where maps can’t be drawn.

AttributeWhat it is
viewfit: all pins in view; follow: centred on the follow pin. One of fit, follow. Default fit.
followThe device of the pin to follow (drawn in the accent).
zoomHow close it comes, 3 to 18; fitting never zooms closer. Default 15.
lookauto (with the theme), light, dark or streets. One of auto, light, dark, streets. Default auto.
interactivefalse keeps it still to the touch. Default true.
labelAccessible label; otherwise it lists the places.
<hd-map></hd-map>

hd-map-pin

One place on an hd-map, written inside it; draws nothing itself.

AttributeWhat it is
deviceWhat it is (a device id), to follow it and glide it.
latLatitude in degrees.
lonLongitude in degrees.
nameIts label beside the pin.
iconRegistry icon in the pin. Default device.vehicle.
sinceWhen it was seen there (ISO time), shown as "4 min ago".
staletrue when the device is unavailable: the pin fades.
<hd-map-pin></hd-map-pin>

hd-map-backdrop

A still, faded map behind a tile’s content (A.1), centred on a place, with the hd-map-pin children as small marks; the place moves over the picture and a new picture is drawn once it leaves the middle. A picture, not a live map: no WebGL per tile. E-ink: grey. Reduced motion: no fades or gliding.

AttributeWhat it is
latLatitude of the place it shows, in degrees.
lonLongitude of the place it shows, in degrees.
zoomHow close it comes, 3 to 17 (14: the streets around it). Default 14.
lookauto follows the theme (light or dark); or always light, dark or streets. One of auto, light, dark, streets. Default auto.
fadeHow much of the map shows through the tile, evenly: soft shows most. One of soft, medium, strong. Default medium.
labelsfalse leaves out street names, places and symbols. Default true.
labelAccessible label. Default Map.
<hd-map-backdrop></hd-map-backdrop>

hd-weather-icon

The weather, drawn from registry icons and moving calmly: the sun turning, the moon under twinkling stars, clouds drifting, rain falling, snow fluttering, lightning striking, fog sliding. Reduced motion and e-ink: still.

AttributeWhat it is
conditionWhat the sky does. One of clear, partly, cloudy, fog, rain, sleet, snow, thunder. Default cloudy.
intensityHow much falls. One of light, moderate, heavy. Default moderate.
nightThe moon instead of the sun. Default false.
showersThe sun breaking through, behind the cloud. Default false.
sizeIts size (CSS), e.g. 48px; or set --size. Default 48px.
labelAccessible label; otherwise the condition.
<hd-weather-icon></hd-weather-icon>

hd-weather-sky

A living sky that fills its tile, under the content: the condition’s sky by day or night, toned to the theme, with the sun, stars, drifting clouds, rain, snow, lightning or fog moving in it. Reduced motion: still; e-ink: none.

AttributeWhat it is
conditionWhat the sky does. One of clear, partly, cloudy, fog, rain, sleet, snow, thunder. Default cloudy.
intensityHow hard it rains or snows. One of light, moderate, heavy. Default moderate.
nightThe night sky. Default false.
showersThe sun breaking through. Default false.
<hd-weather-sky></hd-weather-sky>

hd-camera

A camera: its latest snapshot as the picture, live video over it while the tile is on screen (the host signals WebRTC with its own session, so the template never sees a token), a status pill (Live, Connecting…, Paused, Snapshot with its age, Unavailable) and, when asked, the camera’s name, a motion badge and an expand mark, over soft scrims. It streams only while visible, while the page is visible and the host allows it, never on e-ink (the snapshot only, refreshed), at most four at a time per page, and retries with backoff when a stream can’t start, showing the snapshot meanwhile. It fills its parent and sets data-state on itself: connecting, live, paused, failed, snapshot or unavailable.

AttributeWhat it is
videoThe device’s video by name. Default snapshot.
imageThe device’s snapshot image by name, shown until the video plays and instead of it. Default snapshot.
deviceDevice id; defaults to the widget’s own device.
liveStream live video; without it, snapshots only. Default false.
labelThe camera’s name, top left; left out without it.
roomSmall text after the name, e.g. the room.
motion-nowMotion right now: the badge says so. Default false.
motion-atWhen motion was last seen (ISO); the badge says how long ago, kept up to date.
detectedWhat was seen, when the camera says (Person, Vehicle).
bareNo name and no expand mark, for the big view that has them. Default false.
bigThe big view: it streams even when other cameras use all the places. Default false.
soundPlay the camera’s sound (it is muted otherwise). Default false.
unavailableThe camera is unavailable: no streaming, greyed snapshot. Default false.
<hd-camera></hd-camera>

Layout

Sections, tabs and places that arrange the rest.

hd-section

on change

A part of the widget that folds open and closed under a heading, like the sections of the widget settings; while closed it shows summary. To remember it per screen, bind open to the widget’s state and keep each change: open="{{ state.schedule }}" data-hd-on-change="setState('schedule', event.value)". Without that it still folds, but starts over when the widget is drawn anew.

AttributeWhat it is
headingrequiredWhat the section is called.
iconSemantic icon before the heading.
summaryA short line beside the heading while closed, e.g. “Next: 21° at 17:00”.
opentrue (open) or false (closed); empty leaves it to start. Bind it to state to remember it.
startHow it starts while open is empty, so before anything is remembered. One of closed, open. Default closed.
variantA heading over a hairline, or a raised card. One of plain, card. Default plain.
<hd-section heading="Details" open="{{ state.details }}"  data-hd-on-change="setState('details', event.value)">  <p>{{ device.name }}</p></hd-section>

hd-tabs

on change

Panes (hd-tab) of which one shows at a time, switched by tapping the tab bar, swiping across the pane or the arrow keys. To remember the choice per screen, bind selected to the widget’s state and keep each change: selected="{{ state.period }}" data-hd-on-change="setState('period', event.value)".

AttributeWhat it is
selectedThe name of the tab to show; empty or unknown shows the first.
labelWhat the tabs choose between, for screen readers, e.g. “Period”.
variantThe tab bar: a pill track, an underline, or dots (the labels are read out). One of pill, underline, dots. Default pill.
placementWhere the tab bar sits. One of top, bottom. Default top.
swipeSwiping across the pane goes to the next or previous tab (and never pages a wall panel). Default true.
<hd-tabs label="Period" selected="{{ state.period }}"  data-hd-on-change="setState('period', event.value)">  <hd-tab name="today" label="Today"><p>Today</p></hd-tab>  <hd-tab name="week" label="Week"><p>This week</p></hd-tab></hd-tabs>

hd-tab

One pane of hd-tabs, directly inside it.

AttributeWhat it is
namerequiredWhat selected and event.value call it, e.g. today.
labelrequiredThe text on its tab.
iconSemantic icon on its tab, before the label.
<hd-tab name="month" label="Month"><p>This month</p></hd-tab>

hd-place

Puts what is inside it (an hd-icon, an hd-image, anything) at a spot and size of its own, over or behind the rest, relative to the widget (or the nearest element with position: relative). What is inside fills its box.

AttributeWhat it is
atOne of nine spots; sets x, y and anchor at once. One of top-left, top-center, top-right, middle-left, middle-center, middle-right, bottom-left, bottom-center, bottom-right.
xAcross, from 0 (left edge) to 100 (right edge); wins over at.
yDown, from 0 (top) to 100 (bottom); wins over at.
anchorWhich point of the box sits at x, y: the same as at unless given, else the middle. One of top-left, top-center, top-right, middle-left, middle-center, middle-right, bottom-left, bottom-center, bottom-right.
sizesmall, medium, large or huge (24, 40, 64 or 96 px); or a width: a share of the widget (40%) or pixels (56px). Default medium.
ratioWidth to height of the box: 1, 1.5, 4/3 or 16/9. Default 1.
layerOver the content, or behind it (and then it takes no taps). One of front, back. Default front.
<hd-place at="top-right" size="large">  <hd-icon name="device.light"></hd-icon></hd-place>