Repository navigation
Conversation
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.
Problem
Devices that only have
windowcoverings_state(up / idle / down) and nowindowcoverings_set, such as Somfy RTS blinds, are exposed with just theLiftfeature. That only supportsUpOrOpen/DownOrClose/StopMotion.Apple Home controls blinds by position: it sends
GoToLiftPercentageand expects a current and target position. With onlyLift, these devices show up in Apple Home as "Not Supported" or "No Response" and can't be controlled. The existing note in this branch points at the same thing ("The status seems to be synced, but it doesn't show up in Apple Home").Change
State-only window coverings are now exposed as position-aware two-position blinds (
Lift+PositionAwareLift):goToLiftPercentage: positions of 50% or more senddown, lower positions sendupupOrOpen/downOrClosesendup/downas before, and set the position to fully open or closedstopMotionsendsidleas before and leaves the position unchangedup/downstate change in Homey updates the reported positiondown, otherwise openBlinds with
windowcoverings_setand all other device classes are unaffected.Removed:
operationalStatussyncingMost of the deleted lines are the code that mapped
windowcoverings_statetooperationalStatus(Opening / Closing / Stopped), both on creation and on state changes. I removed it because these devices' state staysup/downafter the blind has finished moving. It only returns toidleon an explicit stop, so the status would report "Opening" / "Closing" indefinitely. With position support added, that risks controllers showing the blind as permanently moving. The reported position now carries the state instead. Happy to restore it if you'd prefer to keep it.Trade-offs
PositionAwareLift. In my case, Apple Home picked this up after an app restart.Testing
com.somfy) on Homey Self-Hosted Server, controlled from Apple Home: open, close, slider and stop all work.tests/window-coverings.test.mjs, covering position commands, up/down/stop, and Homey state sync. It fails on the current code and passes with this change. The fullnpm testsuite passes (28/28).