-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Update tuya.ts #8099
Update tuya.ts #8099
Conversation
src/devices/tuya.ts
Outdated
return {up: 1, down: 2}; | ||
}, | ||
exposes: [ | ||
e.cover_position().withEndpoint('up'), |
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.
It's not nice that also these exposes are under an endpoint. I propose to modify tz.tuya_cover_calibration
instead to support up and down calibration. (e.g. calibration_up
, calibration_down
). Then we can also keep this in the original TS130F
definition (add calibration_up
and calibration_down
exposes conditionally in the exposes function)
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 have implemented the feature following your suggestion.
I also update fz.tuya_cover_options
with calibration_time_up
and calibration_time_down
src/converters/fromZigbee.ts
Outdated
const value = parseFloat(msg.data['moesCalibrationTime']) / 10.0; | ||
result[postfixWithEndpointName('calibration_time', msg, model, meta)] = value; | ||
if (endpoint === 2) { |
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.
Let's only expose calibration time up/down for ``:
if (meta.device.manufacturerName === '_TZ3000_cet6ch1r') {
..
} else {
..
}
Add support for calibration time up and down in tuya_cover_options Signed-off-by: Jonathan Sciarrabba <sciarrabba.j00@gmail.com>
Add support for calibration up and down in tuya_cover_calibration Signed-off-by: Jonathan Sciarrabba <sciarrabba.j00@gmail.com>
Add support for Tuya TS130F _TZ3000_cet6ch1r, it supports different calibration times for up and down Signed-off-by: Jonathan Sciarrabba <sciarrabba.j00@gmail.com>
Thanks! |
Add support for LoraTap SC400ZB-EU, same as LoraTap SC400 but supports different calibration times for up and down