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

Move Niko custom clusters to zigbee-herdsman-converters #1301

Merged
merged 3 commits into from
Jan 28, 2025

Conversation

svenjochems
Copy link
Contributor

@svenjochems svenjochems commented Jan 18, 2025

The niko specific clusters are moved to zigbee-herdsman-converters in Koenkk/zigbee-herdsman-converters#8635

@sjorge
Copy link
Contributor

sjorge commented Jan 18, 2025

@svenjochems
Copy link
Contributor Author

@sjorge agreed. I tried that briefly without success. Since I have little experience with this codebase and own only 1 of the Niko device types I don't think I am the right person for such a refactor.

@sjorge
Copy link
Contributor

sjorge commented Jan 18, 2025

You can add this above the fz: { in https://github.com/Koenkk/zigbee-herdsman-converters/blob/45fa04699ec81700b84caed008d42cc3e3eda8f9/src/devices/niko.ts#L12

    modernExtend: {
        addCustomClusterManuSpecificNikoSwitch': () =>
            deviceAddCustomCluster('manuSpecificNikoSwitch', {
                ID: 0xfc01,
                manufacturerCode: Zcl.ManufacturerCode.NIKO_NV,
                attributes: {
                    switchActionReporting: {ID: 0x0001, type: DataType.BITMAP8},
                    switchAction: {ID: 0x0002, type: DataType.UINT8},
                },
               commands: {},
                commandsResponse: {},
            }),
    },

Then delete the manuSpecificNiko2 entry in src/zspec/zcl/definition/cluster.ts.

Then back in src/devices/niko.ts just add

 extend: [local.modernExtend.addCustomClusterManuSpecificNikoSwitch()],

To the devices you updated.

@Koenkk
Copy link
Owner

Koenkk commented Jan 19, 2025

Please use the deviceAddCustomCluster instead indeed, then the cluster can be removed from here.

@svenjochems
Copy link
Contributor Author

The specific Niko clusters are moved to zigbee-herdsman-converters in Koenkk/zigbee-herdsman-converters#8635.
I will update this PR to remove these clusters.

@svenjochems svenjochems changed the title Add attribute to enable state reporting for Niko switches Move Niko custom clusters to zigbee-herdsman-converters Jan 28, 2025
@Koenkk Koenkk merged commit 2ba0048 into Koenkk:master Jan 28, 2025
1 check passed
@Koenkk
Copy link
Owner

Koenkk commented Jan 28, 2025

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