Add transition support for Sonoff MINI-DIM#1777
Open
azgooon wants to merge 1 commit intoAlexxIT:masterfrom
Open
Add transition support for Sonoff MINI-DIM#1777azgooon wants to merge 1 commit intoAlexxIT:masterfrom
azgooon wants to merge 1 commit intoAlexxIT:masterfrom
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
transitionTimeparameter 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/zeroconfendpoint either ignores it or returns atext/htmlerror and times out.What this does
LightEntityFeature.TRANSITIONtoXMiniDimtransitionis passed tolight.turn_on, the brightness is sent via local as usual (fast), then the full command includingtransitionTimeis fired through cloud in the background usingasyncio.create_taskso the caller isn't blockedTesting
Tested on my MINI-DIM (firmware 1.1.2) with:
light.turn_oncalls withtransition: 3andtransition: 5— smooth fades both up and downHappy to adjust if there's a better way to handle the local/cloud split. Cheers!