OpenHausIO / frontend

User interface for controlling things
2 stars 1 forks source link

Add range steps into sliders #141

Open mStirner opened 2 days ago

mStirner commented 2 days ago

Currently command parameters type=number are renderted as range sliders:

grafik

The have no inidcaiton about the steps/range. Add a step indicator, example:

grafik

mStirner commented 2 days ago

Note: There is also no value shown. How to get the current value and display it?

Example: grafik

A command parameter (as rendered in the gui above) does not have a state, it is just set when the command is send to the backend. Its one way. There is no way to get the "current parameter value"

mStirner commented 2 days ago

Add a link between params & states? A state could be used to keep track of setted parameters.

E.g. Temperature. You set the tempretature via Command parameter in the range of 16-32°C. The command is send to the device, and this "should" temperature is then setted as state.

Then there needs a link between the command "set temperature" & the state temperature.

mStirner commented 2 days ago

Feels like this can already be done.

A quick guess how it could be done: command & state alias. If they are both the same, the (can) are linked. Either automatically or with labels:

oh.link[0].state=POWER
oh.link[0].cmd=POWER

-- or --

oh.links[].enabled=POWER

But what then? When commands & states are linked, what now? https://github.com/OpenHausIO/backend/issues/501#issuecomment-2377883299

When there is a state with the same command alias, just display the state value inside the command parameter view as seen in the screenshots above.

In combination with a additional added hidden property, the state can be hidden from the endpoint view but seen as value in the command trigger view.