Skip to content

Add transition support for Sonoff MINI-DIM#1777

Open
azgooon wants to merge 1 commit intoAlexxIT:masterfrom
azgooon:minidim-transition
Open

Add transition support for Sonoff MINI-DIM#1777
azgooon wants to merge 1 commit intoAlexxIT:masterfrom
azgooon:minidim-transition

Conversation

@azgooon
Copy link
Copy Markdown

@azgooon azgooon commented Mar 28, 2026

Hey! I've been using the MINI-DIM (UIID 277) with an adaptive lighting automation and noticed it was the only dimmer class without transition support. Thought I'd have a go at adding it.

What I found

The MINI-DIM firmware (tested on 1.1.2) supports a transitionTime parameter in milliseconds — the device does smooth hardware fading when it receives it alongside a brightness command. The catch is it only works through the cloud API. The local /zeroconf endpoint either ignores it or returns a text/html error and times out.

What this does

  • Adds LightEntityFeature.TRANSITION to XMiniDim
  • When transition is passed to light.turn_on, the brightness is sent via local as usual (fast), then the full command including transitionTime is fired through cloud in the background using asyncio.create_task so the caller isn't blocked
  • When no transition is requested, behaviour is exactly the same as before

Testing

Tested on my MINI-DIM (firmware 1.1.2) with:

  • Manual light.turn_on calls with transition: 3 and transition: 5 — smooth fades both up and down
  • HA scenes with transitions
  • Automation loops (works but cloud latency means transitions arrive slightly after the local command)
  • No transition (existing behaviour) — unchanged

Happy to adjust if there's a better way to handle the local/cloud split. Cheers!

The MINI-DIM was the only dimmer class without transition support.
Its firmware accepts a transitionTime parameter (in milliseconds)
for smooth hardware fading, but only through the cloud API — the
local /zeroconf endpoint ignores it and times out.

This sends the brightness via local first for a fast response,
then fires the transition command through cloud in the background
so the caller is not blocked.

Tested on MINI-DIM firmware 1.1.2.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants