-
Notifications
You must be signed in to change notification settings - Fork 502
CHAD-15784 Zigbee: WindowShadePreset capability updates #2282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Test Results 68 files 447 suites 0s ⏱️ For more details on these errors, see this check. Results for commit 3337da1. ♻️ This comment has been updated with latest results. |
tuya-zigbee_coverage.xml
zigbee-window-treatment_coverage.xml
zwave-window-treatment_coverage.xml
Minimum allowed coverage is Generated by 🐒 cobertura-action against 3337da1 |
@@ -15,6 +15,23 @@ | |||
local capabilities = require "st.capabilities" | |||
local ZigbeeDriver = require "st.zigbee" | |||
local defaults = require "st.zigbee.defaults" | |||
local window_preset_defaults = require "st.zigbee.defaults.windowShadePreset_defaults" | |||
|
|||
local function init_handler(self, device) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like I mentioned in the CHAD-15784, we need this.
device:emit_event(capabilities.windowShadePreset.supportedCommands({"presetPosition", "setPresetPosition"}, { visibility = { displayed = false }})) in init handler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And also we need to add these codes in
-
vimar (init overrided)
https://github.com/SmartThingsCommunity/SmartThingsEdgeDrivers/blob/main/drivers/SmartThings/zigbee-window-treatment/src/vimar/init.lua#L133 -
This is a different driver
https://github.com/SmartThingsCommunity/SmartThingsEdgeDrivers/blob/main/drivers/Unofficial/tuya-zigbee/src/curtain/init.lua#L132
PS: If you hesitate to manage the Unofficial driver, I can request SRCN to do this.
|
||
local function added_handler(self, device) | ||
device:emit_event(capabilities.windowShade.supportedWindowShadeCommands({"open", "close", "pause"}, { visibility = { displayed = false }})) | ||
device:emit_event(capabilities.windowShadePreset.supportedCommands({"presetPosition", "setPresetPosition"}, { visibility = { displayed = false }})) | ||
device:emit_event(capabilities.windowShadePreset.position(window_preset_defaults.PRESET_LEVEL, { visibility = {displayed = false}})) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think 'windowShadePreset.position' should only be emitted when there is no latest value, because the added() handler is called in the case of a hub switch-over.
The same goes for Tuya curtain in Unofficial driver.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I will try to test when Plugin team is ready.(8/1)
Duplicate profile check: Passed - no duplicate profiles detected. |
No description provided.