Docs

Subscription filter

The exact shape subscribe() accepts, as JSON schema.

The filter is validated strictly when subscribe() runs: unknown keys throw, which aborts the installed() or updated() call that made the subscription.

KeyMeaning
{}Any change: state or attribute.
toFire only when the state becomes this value — a raw token ('on') or the friendly label the app shows for the entity ('Open'), any case or separator.
fromFire only when the state leaves this value (combine with to for an exact transition). Same raw-or-label rule.
stateLegacy alias of to. Never combine with to.
attribute.nameWatch one attribute instead of the state.
attribute.valueOnly when that attribute becomes this value; omit for any change.

Allowed keys: from, to, state, attribute.

Labels are resolved at match time

The filter is stored exactly as written. When an event arrives the hub compares the raw token first, then resolves a label through the entity's domain and device class ('Open' is on for a door sensor and open for a cover). { to: 'on' } and { to: 'Open' } for the same handler collapse to one subscription. Labels never resolve for numeric domains (sensor, input_number, counter).

JSON schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "from": {
      "type": "string"
    },
    "to": {
      "type": "string"
    },
    "state": {
      "type": "string"
    },
    "attribute": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "value": {}
      },
      "required": [
        "name"
      ],
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
Generated from docs-bundle v0.1.0, novon-platform 9ce3486c (2026-10-09).

On this page