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

Add basic support for ZigDC #7686

Merged
merged 5 commits into from
Jun 25, 2024
Merged

Add basic support for ZigDC #7686

merged 5 commits into from
Jun 25, 2024

Conversation

xyzroe
Copy link
Contributor

@xyzroe xyzroe commented Jun 24, 2024

Add basic support for ZigDC - Zigbee 6ch DC power meter

@@ -54,6 +67,22 @@ function getSortedList(source: { [key: string]: number }): string[] {
return result;
}

const getKey = (object: { [key: string]: number }, value: number) => {
Copy link
Owner

Choose a reason for hiding this comment

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

Use utils.getKey instead

@@ -33,6 +33,19 @@ const bindCommandList = {
'recall_scene_5': 0x0B,
};

const switchTypesList = {
'switch': 0x00,
'single click': 0x01,
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
'single click': 0x01,
'single_click': 0x01,

const switchTypesList = {
'switch': 0x00,
'single click': 0x01,
'multi-click': 0x02,
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
'multi-click': 0x02,
'multi_click': 0x02,

'switch': 0x00,
'single click': 0x01,
'multi-click': 0x02,
'reset to defaults': 0xff,
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
'reset to defaults': 0xff,
'reset_to_defaults': 0xff,

@xyzroe
Copy link
Contributor Author

xyzroe commented Jun 24, 2024

It seems like everything has been fixed. Thank you!

@Koenkk Koenkk merged commit be53d8a into Koenkk:master Jun 25, 2024
2 checks passed
@Koenkk
Copy link
Owner

Koenkk commented Jun 25, 2024

Thanks!

Could you also submit a picture for the docs? This can be done by:

  1. Create a fork by clicking here
  2. Go to the public/images/devices directory, Add file -> Upload files
  3. Upload the files and press Commit changes
  4. Press Contribute -> Open pull request -> update title/description -> Create pull request

Make sure that:

  • The filename is MODEL.png (update model accordingly)
  • The size is 512x512
  • The background is transparent (use e.g. Adobe remove background)

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