Browse illustrated recipes, check ingredients and start a supported programme on a connected coffee machine.
Coffee Bar · Preview
Loading widget…
Preparing integration examples…
Source under review
The source code and files will be available after this version passes review.
Idle
API contract
Props for integrating the React component in your app.
snapshotCoffeeBarSnapshot | null
Confirmed machine, recipes, available programmes and latest brew. Omit the prop for the standalone interactive preview. Pass null for an unavailable feed.
Send the authenticated brew command. Resolve when accepted and publish successive machine snapshots. Reject on failure. Omit to show the recipe browser without brew controls.
Stable opaque IDs. Retry keeps the same request ID for the same command. The host deduplicates it.
Data and integration
Preview
Ten illustrated drinks with a local heating and brewing sequence. Recipes include volume, ingredients and any manual steps.
Inputs
Provide machine.id, name and status, an ordered list of recipes, and supported programmes linking recipeId to programId. Each recipe has a stable id, name and ordered ingredients with id, label and method. Serving volume is in ml. Ingredient quantities are optional positive numbers in ml or g. Supply imageSrc and manual notes as needed.
Source options
Read machine readiness and programme availability from the authenticated machine integration. Publish a fresh snapshot when readiness, programme availability or the brew state changes.
Actions
Browse with dots, swipe or the menu. Review the recipe and confirm Start brewing. Acknowledgement alone leaves the widget waiting for a confirmed machine update. Manual steps remain visible in the recipe.
Integration requirements
Machine status is ready, heating, brewing, attention or offline. Omit an unsupported mapping or supply unavailableReason to explain an unavailable programme. The host must validate the authenticated machine, selected programme, provider readiness and safety interlocks at execution time. Deduplicate by requestId and prevent concurrent brewing. Keep the most recent brew and echo the requestId even if the programme finishes before the next refresh. Brew phase is heating, brewing, completed or failed. Use progress 0–100 or null when unavailable.
"use client";import { CoffeeBarWidget, type CoffeeBarSnapshot, type CoffeeBrewRequest } from "@lumo/widgets/catalog/smart-home/coffee-bar";type ConnectedCoffeeBarProps = { snapshot: CoffeeBarSnapshot | null; startProgramme: (request: CoffeeBrewRequest) => Promise<void>;};export function ConnectedCoffeeBar({ snapshot, startProgramme }: ConnectedCoffeeBarProps) { // The parent refreshes snapshot from the provider and includes each accepted request ID. return <CoffeeBarWidget snapshot={snapshot} onBrew={startProgramme} />;}