Skip to content

hd-trigger

Attributes and example

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="{{ settings.flow.id }}" label="Start Goodnight" confirm="Start Goodnight?">  Goodnight</hd-trigger>

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-focus
The outline round what has keyboard focus.
--hd-lit
The warm colour of a device that is on.
--hd-radius-md
Medium corners: buttons, fields.
--hd-spark
CSS input read by hd-trigger.

Style the host

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