Skip to content

hd-machine

Live preview

<hd-machine kind="fan" on="{{ cap.onoff }}" speed="{{ cap.dim }}" size="40px"></hd-machine><hd-machine kind="heatpump" on="true" working="heating" size="40px"></hd-machine>

Attributes and example

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 kind="fan" on="{{ cap.onoff }}" speed="{{ cap.dim }}" size="40px"></hd-machine><hd-machine kind="heatpump" on="true" working="heating" size="40px"></hd-machine>

Styling

Set CSS variables on the component element. Its internal elements live in Shadow DOM; only the exposed named parts can be styled with ::part.

--hd-accent
The theme’s accent: active controls, links, highlights.
--hd-cool
The cool counterpart: cooling, cold water, low prices on some themes.
--hd-ease-out
The easing of most movement.
--hd-flat
1 on e-ink: no colours, glows or gradients, only black and white.
--hd-lit
The warm colour of a device that is on.
--hd-machine-cooling
CSS input read by hd-machine.
--hd-machine-off
CSS input read by hd-machine.
--hd-machine-on
CSS input read by hd-machine.
--hd-machine-running
CSS input read by hd-machine.
--hd-motion-base
An ordinary change, like a value sliding.
--hd-motion-slow
A slow change, like a theme switching.
--hd-motion-tempo
CSS input read by hd-machine.
--hd-text
Text and big numbers.
--hd-text-muted
Labels and secondary text.

Style the host

hd-machine {  --hd-accent: #2563eb;  max-width: 100%;}
Theme variables