Skip to content
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

Merged
merged 3 commits into from
Oct 14, 2024
Merged

Update tuya.ts #8099

merged 3 commits into from
Oct 14, 2024

Conversation

jonnysciar
Copy link
Contributor

Add support for LoraTap SC400ZB-EU, same as LoraTap SC400 but supports different calibration times for up and down

return {up: 1, down: 2};
},
exposes: [
e.cover_position().withEndpoint('up'),
Copy link
Owner

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)

Copy link
Contributor Author

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

const value = parseFloat(msg.data['moesCalibrationTime']) / 10.0;
result[postfixWithEndpointName('calibration_time', msg, model, meta)] = value;
if (endpoint === 2) {
Copy link
Owner

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>
@Koenkk Koenkk merged commit 9aef8e4 into Koenkk:master Oct 14, 2024
2 checks passed
@Koenkk
Copy link
Owner

Koenkk commented Oct 14, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants