Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Output button removal for relay use #125
No problem. Im not good speaker in english. So i want one button and after
Ah, that’s simpler than I thought. That would be called a toggle.
Yes, you could modify
However, there’s a reason for the current design: The state of the GPIO pin may have changed in the mean time (e.g., if another program changes it). I’m not even sure whether they’re initialized to “off” at when Heimcontrol starts – I think they just stay in whatever state they’re in.
But again to be clear: This might lead to a situation where only the “On” button is shown even though the device is already on; clicking it at that point would have no effect (but would bring the system back into a consistent state).
If this is not a problem, or you’re brave enough to try it anyway, do this:
(The result may not look pretty; I’ll leave those improvements to you.)
Thank you very much. I'll try these modifications after my work.
However I have several other devices that require the on/off function so I wouldn't want it for them all.
Sorry for the late reply, I’ve been a bit busy.
@scrobel: There isn’t any built-in way to do this, but you can modify the Jade template I refered to earlier to achieve whatever cosmetic changes you desire. (See Jade website, in the end it’s just HTML.)
@pete54321: Again there's no built-in way to do this, but you could customize the Jade template. In this case, you’d need some conditional that applies only to that tri-state switch. (Something like
Off the top of my head, it could look something like this:
Let me know if you need more details, but it might take a while for me to answer.