I would like to have a button that outputs ON as long as the button is pressed!
If you press the button, in the iOS app or in the BasicUI website, by finger or mouse, only then an ON signal should be given. And whenever nothing is pressed (finger or mouse), there should be an OFF signal.
Just like a real mechanical button (without relay or hold) works.
Switch item=button mappings=[ON="Push"]
How is this possible?
Use case:
A roller blind should move up or down while the button is pressed and when the button is released, it should stop.
I don’t think what you want is currently supported by Sitemap (BasicUI). However, you can achieve something similar by pressing to start your roller blind, and pressing again to stop it.
It’s just because nobody who could implement it, ever needed such ability. Has there even been a feature request? If there is none, then nobody is even aware of it.
So what you want is the ability for a button UI to send one command on press, and another command on release, right?
That’s how lots of buttons work…just not the type that you want.
All buttons are switches. In electronics terms, what you want to replicate is a momentary switch, which only maintains a connection as long as it’s pressed (like a keyboard key). The alternative is a toggle switch (like the power button on a simple flashlight).
I’m glad you found that Github issue so that you can support it. As things are right now, @jimtng’s suggestion is the easiest way to accomplish something similar to press/depress functionality.
As to why press/depress hasn’t been implemented, my guess is that people have been content to just use two button presses instead (rather than putting in a feature request). It’s also possible that someone did ask before–until recently, there’s been very little work done on sitemaps.
If you want an alternative solution, I use rules to move my rollershutters in specific intervals based on factors such as time of day, temperature, UV level, cloud coverage, and open/closed windows. I’ve also made the intervals available in my site map, so that I can trigger them manually.
The reason this works is that I rarely want to control them manually. My rollershutters move to the right positions based on the environmental conditions, without me having to think about them at all.
Some folks go even further, having their rollershutters constantly adjust throughout the day based on the position of the sun. That’s more than I need, but I love that it’s possible.
For sure. I have a Z-Wave remote control on my desk for just that purpose. But rather than moving my blinds incrementally, it just goes through the progression.
Unfortunately for me, the spot where I tend to get blinding sun is through my balcony door, where I can’t mount an automated blind. I’ve instead used a $5 IKEA blackout blind.