Closed nagyrobi closed 3 years ago
See in examples Set Long idle time. Any other setting applies like this, like GPIO templates etc (see submodules).
"Set long idle time" is an example of something prone to create problems... maybe we should revise that command altogether...
Commands should really be a list of keywords not json objects...
What do you mean? Several commands require json formatted lines as parameters. jsonl
is the strongest example. "Set long idle time" is just similar to that, but on other (settings) topic.
We need to set idle time 2 times a day, as we don't want the screen to go completely off, just during the night. So during the day the idle2 time is 0, while during the night it's 120. (it's in the example automations, I'd like to make a blueprint instead, to simplify it)
json objects in parameters is absolutely fine, my issue is with keyword
Let's make the keyword optional? So the user can go with parameters only without keyword, when using settings topic?
I say, lets remove the keyword and make the topic always */command
But then, how to modify setting? That was the most important point...
lets have a "config" service, but lets discuss that with @fvanroie
I can submit a PR of course for a separate service.
I thought that you were more concerned about having too many services as HA admins don't like that on long term. My goal was to have an all-in-one service, which was intended for more advanced use...
If we drop the existing services (change page, etc) in the long run we will not have more then 2 services
It is also important that we create services that can have their parameters sanitised, too much flexibility means we can't check the user input for mistakes...
Solution for https://github.com/HASwitchPlate/openHASP-custom-component/issues/50.