Open LeLunZ opened 1 month ago
I have seen those warnings too. However, I do not have a v2 beta up and running. Regarding the name functionality: where in the code would you implement it? It could be part of the configuration scheme...
If you think about creating a scheme which a user has to follow when configuring the plugin, I am not 100% sure, If I would do it like that. Because for example with the Presets, if a user already has Presets configured in Wled, and now also needs to change the naming of them (to get them in sync with homebridge-wled-ws) it would be a bit of a hassle.
But I think the issue can just be resolved when stripping all unnecessary characters the initialisation step of a Service. Because you aren't really accessing the service anymore, because you got the actual name stored in your WledControllerPreset object.
I am actually not sure about the ConfiguredName (Characteristic) and displayName (second argument in the constructor). I will check that and see if those are also affected.
Yes, that sounds reasonable. Changing all the preset names is not the best option. However, the usage of the ConfiguredName property led to different results during my tests. My assumption is that Apple changed the something over the time...
With the newest homebridge version you now get a warning (that's not plugin specific):
I currently can't test the plugin with v2 beta, because my esp isn't working :/
Also: With the newest version they have now also implemented a warning for characters in device names which can cause errors. In a plugin I help to maintain we use this function and just wrap all names/configuredNames.