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 devices/tuya.ts #8383

Merged
merged 16 commits into from
Dec 4, 2024
Merged

Update devices/tuya.ts #8383

merged 16 commits into from
Dec 4, 2024

Conversation

Giexperience
Copy link
Contributor

Add a new device GX04

@@ -13124,6 +13124,25 @@ const definitions: DefinitionWithExtend[] = [
],
},
},
{
fingerprint: tuya.fingerprint('TS0601', ['_TZE284_nhgdf6qr']),
Copy link
Owner

Choose a reason for hiding this comment

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

Since the definition is the same, could you add this to the TS0601_soil definition and use tuya.whitelabel for correct detections (search in this file for some examples)

@Giexperience
Copy link
Contributor Author

Giexperience commented Nov 27, 2024 via email

@Koenkk
Copy link
Owner

Koenkk commented Nov 27, 2024

Or is there another way to map TZE284_nhgdf6qr to the correct image, brand, and model?

This exactly the usecase for tuya.whitelabel, example:

tuya.whitelabel('Tuya', 'TS0205_smoke_2', 'Smoke sensor', ['_TZ3210_up3pngle']),

@Giexperience Giexperience marked this pull request as draft December 2, 2024 07:58
@Giexperience
Copy link
Contributor Author

Okay, I understand. I will modify it.

@Giexperience Giexperience marked this pull request as ready for review December 2, 2024 09:29
@Giexperience
Copy link
Contributor Author

Hello, I have added the code for the new device GX04 at line 2158 according to your guidance, and I have also added the new device GX03 at the end. Please review it.

@@ -2155,6 +2155,7 @@ const definitions: DefinitionWithExtend[] = [
[15, 'battery', tuya.valueConverter.raw],
],
},
whiteLabel: [tuya.whitelabel('GIEX', 'GX04', 'Soil Moisture Sensor', ['_TZE284_nhgdf6qr'])],
Copy link
Owner

Choose a reason for hiding this comment

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

Also update fingerprint: tuya.fingerprint('TS0601', ['_TZE284_aao3yzhs']),

src/devices/tuya.ts Outdated Show resolved Hide resolved
src/devices/tuya.ts Outdated Show resolved Hide resolved
src/devices/tuya.ts Outdated Show resolved Hide resolved
Giexperience and others added 3 commits December 3, 2024 12:07
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
@Giexperience
Copy link
Contributor Author

Thanks

@Koenkk Koenkk merged commit fcd5cf7 into Koenkk:master Dec 4, 2024
2 checks passed
@Koenkk
Copy link
Owner

Koenkk commented Dec 4, 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.

3 participants