-
-
Notifications
You must be signed in to change notification settings - Fork 192
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
feat(attributePicker): support custom attributes (nurikk/zigbee2mqtt-frontend#2001) #2019
Conversation
Hi @LaurentChardin! I really appreciate your work and looking forward to merge this pr! 👍 |
Updated with the latest change of Koenkk/zigbee2mqtt#22583 |
is it ready to be reviewed? |
package lock is outdated |
I think i have a different version of pnpm, and since i updated I am pushing an update with an updated version of pnpm as well as updated version of the github action lib. But i can't test it (or more : i dont know how to :) ) |
@nurikk Is there a way to automate the build test to check the configuration ? or maybe you can have a look ? i am trying to fix it blind :) Or i should try it on my own repo i guess. Build is working locally of course. |
this should fix the problem |
you should be able to see how your branch is building in Checks tab |
Yes but it seems you need to trigger it to execute it. I think we could have a workflow that is building it automatically on every PR and update of PR, without the need of a manual action or review. |
I guess github requres approvals when you change actions config. now it should run on every commit. latest commit failed due to linting issues. can be fixed by |
Yes learning how it works the hard way :) |
The latest commit didnt touch the github action file : still requires your approval to test the build phase. @Koenkk // @nurikk ( or @nurikk-sa :) ) : can you activate the build test ? The main change has been merged into the z2m dev branch. |
- Update type definition to import Custom Clusters - Remove zh and zhc dependencies - Duplicate Cluster.ts file as this is becoming static - Updating references in components
- Supporting new topic `bridge/definitions` Introduced in Koenkk/zigbee2mqtt#22583 - Removing previously added files from `zigbee-herdsman`, but keeping the enum one
@LaurentChardin Looks like the tests fail, after that I guess this can be merged? |
The vitest is testing the UI component in a stateless manner. However now we are dependant on the websocket message to retrieve the cluster definition, since we don't have the dependency on ZH anymore : i am not sure how to inject a fake websocket to create the store object in a test case. I am not even sure the test setup is ready for that at all. Right now, the attribute picker UI component is dependant on the store :
There are very little UI test cases defined and none of them are designed to fake a state retrieved from websocket: i believe we need to revamp the whole test suite to enable those kind of tests. |
I found a way to test the UI component by injecting the clusters definition through the component attributes. There might be a better way to test the component with a global state initiated with some server payload, but it does the trick. @nurikk Happy to do things differently if you have a better approach. |
@LaurentChardin can you run |
Done |
Thanks! |
This change is linked to Koenkk/zigbee2mqtt#22583 which will update the device definition.
This change is aiming to enable using Custom Clusters attributes in the dev-console, which are not available through ZH.
Updates:
zigbee2mqtt
withbridge.ts
extension to publish custom clusters as part ofbridge/devices
topic: (feat) Expose Custom Clusters in MQTT Koenkk/zigbee2mqtt#22583Notes: