State Device

Capture, manage, and restore the state of multiple devices with a single click.

What is a State Device?

A State Device allows you to take a "snapshot" of the current state of devices in one or more zones (rooms). You can then use this snapshot to restore those devices to that exact state later.

This is perfect for setting scenes (e.g., "Movie Night", "Cleaning", "Romantic Dinner") where you want to control many devices with specific settings (dim level, color, on/off) simultaneously.

Setting Up a State Device

1

Select Scope

Choose which zones (rooms) to capture. You can select specific rooms or the entire house.

💡 Tip

Start with a single room to get familiar with how it works.

2

Select Devices

The app will scan the selected zones and list all compatible devices. Uncheck any devices you don't want to include in this state.

3

Configure Devices

Fine-tune your selection:

  • Reorder Devices: Use the ↑ and ↓ buttons to determine the order in which devices will be activated.
  • Select Capabilities: Choose which capabilities to control (e.g., include dim but ignore onoff).
  • Reorder Capabilities: Change the order of capabilities for a specific device (e.g., set dim level before turning on).
4

Review & Save

Review the generated JSON configuration. You can edit values manually here if needed (e.g., tweak a dim level from 0.5 to 0.6). Give your device a name and click Create Device.

Key Features

Supported Capabilities

State Device can only control capabilities that are marked as setable by the device driver (e.g., onoff, dim, light_hue).

Note: Some drivers may list a capability as setable but not actually implement the control logic. In these cases, you might see a "Missing Capability Listener" warning in the logs. These capabilities should be removed from your State Device configuration.

Reset All Option

When activating a State Device via a Flow, you can choose to "Turn off other State Devices first?". If checked, all other State Devices will be turned OFF before the new one is applied. This ensures you don't have conflicting scenes active at the same time.

Persistent State

Unlike a simple push button, the State Device stays ON after activation. It acts as a visual indicator of the currently active scene.

Hierarchical Execution

Devices are organized by Zone for better readability in the configuration. You can set delays at different levels:

  • Global Delay: Default pause between all actions.
  • Zone Delay: Override for a specific zone.
  • Item Delay: Override for a specific device.

Advanced Configuration (JSON)

For advanced users, the device configuration is stored as JSON in the device settings. You can edit this at any time.

Structure Example

{
  "config": {
    "default_delay": 200,    // Global delay in ms
    "ignore_errors": true,   // Continue if one device fails
    "debug": false
  },
  "zones": {
    "Living Room": {
      "config": {
        "delay_between": 500 // Override delay for this zone
      },
      "items": [
        {
          "id": "device-id-1",
          "name": "Main Light",
          "active": true,    // Set false to temporarily skip
          "capabilities": [
            { "capability": "dim", "value": 0.8 },
            { "capability": "onoff", "value": true }
          ],
          "delay": 0         // No delay for this specific item
        }
      ]
    }
  }
}
↑ Back to top