Skip to content

About

On-device timers and smooth dimming for Matter, Zigbee, Shelly and Hue lights and switches

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

DeviceSide

HACS Default Latest Version Installs Buy Me a Coffee

DeviceSide unlocks native features in your lights, switches and plugs on Zigbee, Shelly, Philips Hue and Matter.

Key Features

  • Auto-off/on: Turn devices off/on automatically, even if HA goes offline or restarts.

  • Dim smoothly: Press to dim and release to stop, using third-party buttons. No more jittery steps or overshoots.

  • Change colors smoothly: Press to change hue or saturation, release to stop.

  • Flash-free turn-on: Set brightness, color, color temperature or scenes without turning the lights on

  • Zero setup: Connects to your devices automatically via the core integrations

Feature by Integration ZHA Z2M Shelly Hue Bridge Matter
Turn on with timer light switch: Experimental native group light switch: Experimental native group light switch light, native group: not possible light switch
Turn off with timer light, switch, native group: not possible light, switch, native group: not possible light switch light, native group: not possible light, switch: not possible
Auto-off/on (aka inching) light switch
Smooth dimming light native group light native group light light native group
Smooth saturation change light native group light native group light native group
Smooth hue change light native group light native group light, native group: not possible
Set brightness, color or CT
without turning on
light native group light native group light light native group
Set scene without turning on native scene
Get attributes light switch: Experimental native group light switch: Experimental native group light switch light native group light switch

light lights   switch switches   native group native groups   native scene native scene   Experimental grey: experimental   not possible can't be done, as far as we know

Will it work with my device?

Maybe. A key reason these features aren't supported in HA core is that device makers implement them inconsistently. So a feature that works on one device may not work on another. The compatibility section below shows which devices are known or likely to work. If you own a device that isn't known to work, please try it and report the result. To access untested features, turn on Experimental features in Configure > Settings.

Device compatibility by integration

🟢 works · ✔ verified on automated rig · 🟡 should work: takes the same call as a tested device · 🙋 ready for testing · 🔴 doesn't work

ZHA

Zigbee2MQTT

Shelly (Gen2+)

Hue (Bridge v2/Pro)

Matter

Details per integration are in docs/integrations.md.

Get started

Requirements

  • At least one of the ZHA, Z2M via MQTT, Shelly, Hue or Matter integrations installed.

  • Hue Bridges: V2 and Pro; Shelly: Gen 2 and above

Install from Marketplace

Show me how
  1. Open the DeviceSide repository

    Open the DeviceSide HACS repository in your Home Assistant instance.

  2. Click Download

  3. Restart Home Assistant

  4. Add the integration

    Add DeviceSide to your Home Assistant instance.

Usage

Coming from Hue Smooth Dimming?

DeviceSide's actions are drop-in replacements for Hue Smooth Dimming, apart from raise and lower which are renamed. To migrate to DeviceSide, apply these changes in your YAML:

  • hue_dimmer.raise → deviceside.raise_brightness
  • hue_dimmer.lower → deviceside.lower_brightness
  • hue_dimmer → deviceside

Turn on with timer

Action: turn_on_for

Also known as on with timed off (Zigbee, Matter), on_time (Zigbee2MQTT), toggle_after (Shelly), and countdown.

Turn on, then off after a delay. Timer runs on the device, for this turn-on only: it doesn't change a Shelly's own Auto-off setting. Example use case:

  • Run a fan for 20 minutes after a shower.
Example: heater off after 4 hours, with a warning
actions:
  - action: deviceside.turn_on_for
    target:
      entity_id: switch.heater
    data:
      duration: "04:00:00"
    response_variable: result
  - if: "{{ result['switch.heater'].status != 'confirmed' }}"
    then:
      - action: notify.notify
        data:
          message: "Heater timer not confirmed: {{ result['switch.heater'].status }}"
Field Description
target Lights and switches (required)
duration Delay until the device turns off (required). Up to 7 days on Shelly, 6,553.4 s (about 1 h 49 min) on Zigbee and Matter
brightness Brightness (minimum 0.4%). ZHA, Z2M, Shelly
color_temp_kelvin Color temperature (2000–6500 K). ZHA, Z2M, Shelly
rgb_color Color as [red, green, blue] (0–255 each). Z2M, Shelly
hs_color Color as [hue, saturation] (0–360, 0–100). Z2M, Shelly
xy_color Color as [x, y]. Z2M, Shelly
transition Fade time (0–300 s). Z2M, Shelly
response_variable Variable that receives the response from each entity (optional)
Results

Each targeted entity reports a status in the response variable:

Status Meaning
confirmed Command accepted; device reported a running timer
sent Command accepted; timer not confirmed in read-back
unchanged Nothing to send; detail says why

If a requested duration is out of range, clamped_to reports the duration the device actually used, in seconds. A field the entity can't take, like brightness on a plug, is dropped and the rest of the call goes ahead, with detail: fields_dropped.

If a device fails, the action fails and stops the automation.

Cancel a timer

The following actions cancel a turn_on_for timer:

  • Turn off

  • Start a new timer (replaces the old timer)

  • Turn on (i.e. leave on). Tested on Shelly only

Turn off with timer

Action: turn_off_for

Turn off, then on after a delay. Timer runs on the device. Example use case:

  • Power-cycle a router.
Field Description
target Shelly lights and switches (required)
duration Delay until the device turns on (required). Up to 7 days
response_variable Variable that receives the response from each entity (optional)
Results

Each targeted entity reports a status in the response variable:

Status Meaning
confirmed Command accepted; device reported a running timer
sent Command accepted; timer not confirmed in read-back
unchanged Nothing to send; detail says why

If a requested duration is out of range, clamped_to reports the duration the device actually used, in seconds.

If a device fails, the action fails and stops the automation.

Cancel a timer

The following actions cancel a turn_off_for timer:

  • Turn on

  • Start a new timer with either action (restarts the countdown)

  • Turn off (i.e. leave off)

Auto-off (aka inching) and auto-on

Actions: set_auto_off, set_auto_on, clear_auto_off, clear_auto_on

Configure a persistent auto-off delay, that fires on every turn-on (and vice versa) independent of Home Assistant. Example use cases:

  • Inch a garage door by pulsing its relay for 1 second.
  • Turn off an ironing station automatically after an hour.

 [!NOTE] Devices go unavailable briefly after each config change, while the Shelly integration reloads them.

Example: garage door inching
action: deviceside.set_auto_off
target:
  entity_id: switch.garage_door
data:
  duration: 1
Field Description
target Shelly lights and switches (required)
duration Delay until the device turns off/on. Up to 7 days (required)
response_variable Variable that receives the response from each entity (optional)

clear_auto_off and clear_auto_on take only a target.

Results

Each targeted entity reports a status in the response variable:

Status Meaning
confirmed Setting written; the device reported it in read-back
sent Setting written; not confirmed in read-back
unchanged The device already holds this setting, so nothing is sent

If a device fails, the action fails and stops the automation.

Smooth dimming

Create "press to dim, release to stop" automations. Transitions run natively on the device.

Example: two-button dimmer
left_button_held:
  - action: deviceside.lower_brightness

right_button_held:
  - action: deviceside.raise_brightness

buttons_released:
  - action: deviceside.stop
Action Description
raise_brightness Start raising brightness, turning the light on
lower_brightness Start lowering brightness
stop Freeze the move
Field Description
target Lights and groups (required)
sweep_time Duration of a full 0–100% sweep (default 5s)
limit Raise: maximum brightness (default 100%).
Lower: minimum brightness (default 0%). The light turns off at 0%; choose 0.4%+ to keep it on

To dim multiple Zigbee lights together, target a Hue, Z2M or ZHA group instead of separate lights or an HA group. Native groups move in sync via group-wide Zigbee messages.

On Shelly, Multicolor Bulbs (Gen3) dim this way too. Other Shelly lights are refused until tested.

Smooth color changes

Create "press to change color, release to stop" automations. Transitions run natively on the device.

Example: hold to cycle color
button_held:
  - action: deviceside.raise_hue

button_released:
  - action: deviceside.stop
Action Description
raise_saturation Start raising saturation, toward a richer color
lower_saturation Start lowering saturation, toward white
raise_hue Start cycling hue: red, yellow, green, blue. Runs until stop
lower_hue Start cycling hue: red, magenta, blue, green. Runs until stop
stop Freeze the move
Field Description
target Lights and groups (required)
sweep_time Duration of a full 0–100% saturation sweep or 360º hue sweep (default 5s)
limit Raise saturation: maximum (default 100%).
Lower saturation: minimum (default 0%).
Hue moves take no limit

Groups move in step, as for dimming.

Flash-free turn-on

Set brightness, color temperature, color or scenes while the lights are off, so that they turn on predictably without unsightly color or brightness flashes.

Example: set scene for next turn-on
description: Stage the Relax scene in the living room at 22:00, without turning the lights on.
triggers:
  - trigger: time
    at: "22:00:00"
actions:
  - action: deviceside.set_scene
    target:
      entity_id: scene.living_room_relax
GUI example: rearm turn-on brightness after turn-off

See docs/examples/set-turn-on-brightness.md.

Set brightness, color temperature or color without turning on

Action: set_attributes

Sets brightness, color temperature or color without changing on/off state.

Field Description
target Lights and groups (required)
brightness Brightness level (%)
min_brightness Enforce a minimum brightness (%)
max_brightness Enforce a maximum brightness (%)
color_temp_kelvin Color temperature (K)
rgb_color Color as [red, green, blue] (0–255 each)
hs_color Color as [hue, saturation] (0–360, 0–100)
xy_color Color as [x, y]

Set scene without turning on

Action: set_scene

Currently implemented for Hue scenes on the Hue integration only.

Field Description
target Hue scene (required)

Get attributes

Action: deviceside.get_attributes

Read device attributes that aren't exposed reliably by Home Assistant:

  • Check a device's on/off timer and auto-off/on settings.

  • Check a light's brightness, color or color temperature while it's off or transitioning.

Example: how long until the heater turns off
actions:
  - action: deviceside.get_attributes
    target:
      entity_id: switch.heater
    response_variable: result
  - action: notify.notify
    data:
      message: >
        {% set timer = result['switch.heater'].get('timer') %}
        {% if timer %}Heater turns {{ timer.turns }} in {{ (timer.remaining_s / 60) | round | int }} min.
        {% else %}No heater timer running.{% endif %}
Field Description
target Lights and switches (required)

A record holds the keys the device reports: brightness (%), color_temp_kelvin, rgb_color, hs_color, xy_color, timer, auto_off and auto_on.

  • When a timer is running, the timer key holds turns (on / off), ends_at (UTC) and remaining_s.

  • On devices that support auto-off/on, auto_off and auto_on each hold duration (seconds) while set and are null while clear. A missing record means the setting couldn't be read.

Usability patches

  • Color lights on Zigbee2MQTT:

    • Home Assistant shows the wrong color for full-color bulbs in hue-saturation (HS) mode. DeviceSide fixes this by announcing both XY and HS color modes.

    • Hue bulbs: DeviceSide sets Z2M's Hue native control the way each command needs it, then puts your setting back. A turn_on_for with a color turns on without flashing the old color, and brightness moves keep their pace.

  • Hue Bridge: When a brightness move starts, the bridge reports its target brightness (e.g. 0% or 100%) to Home Assistant, which is jarring for moves that you plan to stop. DeviceSide suppresses the bridge's report as a transition starts, and reports the new brightness once the transition stops.

The HS mode and Hue Bridge patches are on by default; turn them off in Configure > Settings.

Uninstall

This integration follows standard integration removal.

  1. Open the integration

    Open the DeviceSide integration in your Home Assistant instance.

  2. Open the ⋮ menu and choose Delete

About

On-device timers and smooth dimming for Matter, Zigbee, Shelly and Hue lights and switches

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages