Hello, I am creating an app for my FlashForge 3d Printer.
I am challenged by the following situation, and I am not sure how to solve it UI wise.
My printer has the state, online or offline. It also has the state, printing or paused / stopped.
What i do now is that the printer has an onoff capability, where if you press the onoff button, it will pause OR resume the current print.
But if you are not printing and the printer is online, the button is obviously gray. But you can’t see if it is online or not.
Should the button represent online offline state, ( But you can’t press it, as the device turns on/off with a physical button ), but how would you resume or pause the print then?
Or should the button represent printing state ( Which you also cant press when its offline ), and should there be an offline online sensor?
Or ???
For me, the device tile should represent the overall device state. That would be on/off in most cases.
I would do in this case:
use device on/off state for the onoff capability.
deactivate the UI quickaction for onoff to prevent taps on the device. If you don’t have a capability listener for it should also work.
set onoff capability to current device state
for print state: use a mode list capability (enum list), shown sensor view. This can be used to show the current state if there is more that just on/off.
for print start/pause you can decide to use a switch (shown in button page, then it’s easier to get there without the dropdown selection when using a second onoff capability). This switch is also a boolean capability. Use c custom capability. Then you can define your own icon and text. This switch can show the print state with the on/off state.
Another possibility is to use two buttons in button page, one to start, one to pause.
I think a switch would be easier to handle for the user because he can seen the state directly at the button state.
I dont fully understand this remark, which UIcomponent do you mean for a the switch? toggle? button? Or do you have an example somewhere that shows what you mean?
Thank you for the help, this is my first homey app, and I find the capabilities in combination with UI have a bit confusing behavior.