-
Notifications
You must be signed in to change notification settings - Fork 9
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
UserModExample - examples for config/ui #50
Comments
We also need a nicer syntax for setting a label of the input than all this
|
Agree this is a lot of code overhead. The reason uiFun was added that storing this in the model json will create a very big model and it is only descriptive. So the ui now asks for this by triggering uiFun. note that this whole structure is a way to implement class like functionality. Alternatively each initNumber etc is a (singleton) class with methods like fx.uiFun or fx.changeFun implemented . |
Hi Will,, it took some time but the solution is in latest commit: This is only for Effects.layers, but next commits will deal with all of Star |
Great. Good to hear there is some progress. I look forward to seeing the new user friendly syntax Do you have something in mind you are aiming for? |
What do you mean with aiming ? |
We agree that this syntax isn't very nice ui->initPassword(parentVar, "pw", "", 32, false, [](JsonObject var, unsigned8 rowNr, unsigned8 funType) { switch (funType) { //varFun But do you know yet what the new one will be, once you have written it? |
ui->initPassword(parentVar, "password", "", 32, false, [](JsonObject var, unsigned8 rowNr, unsigned8 funType) { switch (funType) { //varFun the varFun will stay to catch events (until we find a more syntax friendly version.
|
And now this variable can be retrieved by using the parent id, which will be wifi in this case |
And I also want to implement pubsub so you can say Notify (“wifi”, “password”, onChange, ‘do something’… |
Yeah that would be really helpful to get the bidirectional changes between Star and HomeAssistant working in an efficient manner |
All setLabels except for two occasions where it is conditional completely gone now. |
The UserModExample should show how you display a module in the UI that allows you to request values to be saved to the model/config
The text was updated successfully, but these errors were encountered: