Skip to content

Updated

View MarkdownOpen in ChatGPTOpen in Claude

SDK Changelog

Highlights of @glasshome/widget-sdk; the entry-by-entry history lives in the SDK CHANGELOG. The CLI ships separately: see the CLI changelog. Dash app releases live in the Dash changelog; Hub API changes in the Hub changelog.

Notable SDK releases

1.10: calendars and service responses

  • useCalendarEvents(id, options?): live events for a calendar entity, pushed by Home Assistant, with a configurable window. Replaces the removed state.conn access.
  • callService(..., { returnResponse: true }) resolves Home Assistant’s service response, so response-only services like todo.get_items work from a widget. Needs Dash 1.1.0-beta.5 on the host: older hosts run the call but resolve undefined.

1.10.3: Windows builds, ui installs itself

  • Builds on Windows failed at validation (“Received protocol ‘c:’”): the introspection step imported the bundle by filesystem path. Fixed.
  • @glasshome/ui is a required peer again. 1.10.0 marked it optional, so a fresh project stopped receiving it and every build failed with “@glasshome/ui is required to build widgets”. Run bun widget upgrade (CLI 0.11+) or bun update @glasshome/widget-sdk.

1.9: richer config, measured dimensions

  • field.list(item, opts): add/remove/reorder lists of sub-forms, and field.variants(discriminator, variants): discriminated-union configs. See the Config API.
  • useWidgetDimensions() replaces ctx.dimensions() (deprecated, removed in 2.0). It throws outside <Widget> instead of silently reporting a zero-size box.
  • 21 @glasshome/ui primitives re-export through the SDK barrel, so sdkVersion gates them; direct @glasshome/ui imports are deprecated.
  • Builds write the config schema, defaultConfig, examples, and configVersion into the manifest, and validate examples against your schema before publish.

1.4: the Config API

  • defineConfig + field.* replace hand-written zod schemas (zod stays available as an escape hatch via the SDK’s z re-export). About 55KB lighter per widget.
  • widgetFields.* and raw z.object configs deprecated; bun widget migrate config auto-migrates most widgets. See Config API.

1.2: scoped entity pickers

  • Entity fields accept { deviceClass } to scope the picker (for example temperature sensors only).

1.0: the security release

  • Widgets moved into an isolated, permission-scoped sandbox: shadow-root rendering, capability declarations, no direct HA access. Migration checklist: Upgrading to SDK 1.0.

Coming in 2.0 (breaking)

  • widgetFields and the raw-zod config path are removed; defineConfig + field.* become the only way to declare config. Migrate now with bun widget migrate config.
  • ctx.dimensions() and direct @glasshome/ui imports are removed (deprecated since 1.9; builds already warn).

How versioning works

  • Widget SDK (@glasshome/widget-sdk) ships on npm. Each widget declares an sdkVersion range in its manifest; the registry serves each dashboard the newest compatible build. See Widget SDK.
  • Widget config version (configVersion) is a per-widget integer you bump when your widget’s config shape has breaking changes. See Config Migrations.

Releases

@glasshome/widget-sdk on npm