Make Shelly 2PM cover tilt configurable#12497
Conversation
|
This is cool. But I don't think it should be specific to Shelly, and disabled by default. |
|
im currentlky still trying to find a way to read the state that is actually set via the WbUI/App on the shelly to make auto useful Edit: im currently looking at https://shelly-api-docs.shelly.cloud/gen2/Integrations/Zigbee/RPCCluster and i think it should be possible |
a391be7 to
2b87093
Compare
2b87093 to
0186739
Compare
Could we go for this solution directly? |
|
Ive already implemented it, just havent updated the MR description yet |
0186739 to
b99c20f
Compare
|
Updated the implementation and PR body around this.
I kept the option Shelly-specific because the only device-side source of truth here is Shelly RPC; the generic cover path is unchanged. |
e8cc761 to
755469a
Compare
99a6d22 to
8ef9789
Compare
8ef9789 to
3ed5fa2
Compare
|
thanks! |
|
Thanks a lot for adding this, @MaxRink — being able to hide tilt controls for covers without slats is a nice improvement! Just want to flag one thing for other users upgrading: on my existing Shelly 2PM cover with real venetian-blind hardware, tilt was always exposed before, and after this update it disappeared from Home Assistant. The auto detection via Cover.GetConfig apparently didn't pick up slat.enable correctly in my case. For anyone else running into this: you can fix it via the Z2M UI under the device's Settings (specific) tab → Cover tilt enabled, and set it to true:
To be clear, this is a one-time migration issue for existing setups, not an ongoing problem — going forward, new pairings should detect this correctly from the start. |
Indeed! |



Summary
Cover.GetConfigover the Shelly RPC cluster during configure and persistslat.enableinto device metadata.cover_tilt_enableddevice option withauto,true, andfalsefor manual override when RPC config cannot be read.Cover.GetConfigresponses wrapped inresult, wrapped inparams, or returned directly.Scope
This PR is intentionally cover-only. The related behavior from the original combined branch was split into separate PRs:
Review feedback addressed
autois no longer equivalent tofalse: after configure it follows the device-reportedslat.enablevalue, whiletrueandfalseremain explicit overrides.slat.enable: false.Validation
PATH="/opt/homebrew/opt/node@24/bin:$PATH" npx pnpm@10.18.3 exec vitest run test/shelly.test.ts --config ./test/vitest.config.mts(8tests)PATH="/opt/homebrew/opt/node@24/bin:$PATH" npx pnpm@10.18.3 exec biome check --error-on-warnings src/devices/shelly.ts test/shelly.test.tsPATH="/opt/homebrew/opt/node@24/bin:$PATH" npx pnpm@10.18.3 run buildgit diff --checkLive validation
cover_tilt_enabledoption.