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

FIX, Better Tuya reconization #4616

Merged
merged 7 commits into from
Mar 27, 2021
Merged

Conversation

Smanar
Copy link
Collaborator

@Smanar Smanar commented Mar 20, 2021

This PR make 2 things, It creates a battery sensor for some tuya covring, and can help for pairing because the sensor can be used to get the manufacture name for the "light" device creation.

It help too for checks, previously I was using

if (manufacturer.endsWith(QLatin1String("0yu2xgi")))

And now

R_GetProductId(&lightNode) == QLatin1String("NAS-AB02B0 Siren"))

But the problem is R_GetProductId need manufacture name AND model id, but with this modification, only the manufacture name is usefull.

This was referenced Mar 20, 2021
@Smanar Smanar changed the title Better Tuya reconization FIX, Better Tuya reconization Mar 20, 2021
@@ -551,13 +551,15 @@ const QString R_GetProductId(Resource *resource)
}

const auto *manufacturerName = resource->item(RAttrManufacturerName);
const auto *modelId = resource->item(RAttrManufacturerName);
const auto *modelId = resource->item(RAttrModelId);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch

@manup manup merged commit 00755a2 into dresden-elektronik:master Mar 27, 2021
@Smanar Smanar deleted the tuya_14 branch June 19, 2021 11:13
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.

Unable to pair battery powered Zemismart Chain Roller Shades Driver M515EGBZTN in v2.10.1
2 participants