-
Notifications
You must be signed in to change notification settings - Fork 17
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
Device Version: Existing Capabilities Migration #150
Comments
Can it also include removed capabilities as well? I know it could potentially break rules - but I don't think that would be a deal breaker (and you could potentially use the red exclamation mark to show rules that were broken).. |
Hi @MichaelKohler , I have noticed the same using my homey implementation. I've tested this with a switch and a slider and both have the renaming issue. didn't test the other components yet. Lets say you start with a button and a switch. with names: button, switch.
or same start situation:
Video demoing this: https://youtu.be/Dpng_d0xZpQ |
Will this be fixed in 0.52.x? If not i could implement a workaround in my Homey app. |
@tmrobert8 removal is a tricky one. The main argument against it is if there's a shortcut to X and X is removed, either the shortcut is broken or it's automatically removed. Meaning for the user easier it's broken or we're messing with their configuration by removing things. @nklerk I'm not sure what you mean, I'll try to clarify how it currently works. The way it works is we need a unique identifier for each component to be able to match them, that's the name. The label is handled differently, it's a property of the component so it can be updated as long as the name doesn't change (same goes for sensor range, and other properties they should all update). |
In my integration when a user adds, removes or renames(label change) a component I ++1 the version number and register the device adapter. The user can only change the label, not the actual name. making the name UUID based is a good thought and i will definitely move that way. I've added the issue on Planet NEEO beta section. but was instructed to look here. Short description would be that a label change on a sensor based capability (switch,slider etc) won't be updated on the brain side. Only after adding or removing a button the label changes of the sensor based capabilities get updated. I know this sounds weird but it is what it is. The PN description i used. I found some issues regarding the SDK Update feature. Changing the name of a slider or switch (posibly more capabilitie types but not tested) only work when a button is added or deleted. |
@nklerk the issue was on the NEEO Brain, the updating code added all new components but stopped after the first updated component. In the case of a switch, there's a switch and a sensor, the sensor would be updated but not the switch. Then if you added another button after that it would run the "next" update it didn't get to which was the switch. Note: it will be fixed in 0.52.x |
Cool! Thanks for your help. |
In addition; can we show the custom driver version somewhere? I now added it to my discovery description, but it feels 'off'; Preferably it should be shown beneath the device name.. Sample screenshot: |
Follow-up from #18 (comment):
Currently the device version number will trigger an upgrade of the components. However, this currently doesn't account for migration of existing capabilities (for example rename "PWR OM" to "POWER ON"). This issue will track the work on this.
The text was updated successfully, but these errors were encountered: