I just got an RM PRO and made it learn the remotes then imported the IR codes into HA. Then I used floorplan to create some remotes and mapped the switches from the RM PRO to the buttons on the floorplan - works a treat
The one thing missing in that list is an Input button if you ask me.
And yes; we can use scripts, but I personally do not like how they show up in the front end with their ‘activate’ label. In a lot of cases, this representation is too elaborate already.
For example, I can call an URL to move my camera up/down/left/right. I would like to have something like this (a label with four buttons)… Move camera 🠜 🠝 🠟 🠞
But at the moment I’m stuck using this… Move camera left ACTIVATE Move camera up ACTIVATE Move camera down ACTIVATE Move camera right ACTIVATE
… which takes up a lot of screen real-estate without adding anything. If anything, it makes things unnecessarily complicated.
Regarding the use of floorplan etc.: Yes, we can solve it using a tool or plugin like that. However, I find it a bit shocking that we have to use something so elaborate just to get a (few) simple buttons. I see those more as a workaround than a solution.
I agree with the OP.
I’m happy to be shot down flamed and corrected castigated and made to feel small like many forum folks love to do, but after six months of trying to learn HA and everything surrounding it, it seems to me that the most basic mechanical input device for HA to mimic or accept was overlooked ?
A switch_momentary.
We have a latching switch effectively as a basic I/O function, and that works a treat for me with great ease and no fuss at all for matching hardware like mains sockets and real lights, I was very happy at how fast I got those to do great stuff, but later when I added RF door switches and some RF key fobs it got tough fast. Components like RFlink hub, create basic light. entities for each RF device (or every button code on each RF device) and it gets very messy very fast to make that into a usable momentary switch or binary sensor.
At the moment for instance, to make a Sonoff DW1 door switch behave like the momentary device it really is, I have too:
Identify the RFlink automatically created light.entity device name once it appears in hassio, and then manually create a switch in configuration.yaml to make it appear a switch in hassio, then I create a template binary sensor in configuration.yaml to make a virtual binary sensor from that entity, then use two automations to make that reset to closed after a few seconds to mimic the physical RF switch.
If I have 12 window and door switches like that one (because they cost half what a open/closed signalling switch costs) they I’m tapping away at my PC for hours when I should be building or installing hardware to actually do some automation…
Anyway, maybe I missed some crucial bit of info that would cut out three or four of those steps. If so PLEASE tell me straight up what it is cos if it’s there I’ve repeatedly missed it
By momentary switch, you mean a button on the interface that when pressed preforms the action and then is back in its original state ready for the next press?
If so, the magical thing you’ve been missing is called ‘script’.
If you put a script on the front end, it (by default) puts a button called activate. Pressing this button runs the script, which is to send the rf command. Press it a second time, it sends the rf command again, exactly as a momentary switch would.
Admittedly the ACTIVATE button is not so pretty, but there’s multiple custom_ui options to solve this.
Thanks gentlemen, both of you.
No I’d not found script in relation to momentary switch so I’ll have a look.
Yep you are right, I’m meaning a momentary switch as is in the physical sense of a switch that is spring loaded so that once the user stops pressing it the signal, trigger or connection is gone. A morse code key would be a classic example, as is any button on a TV remote control, car alarm fob or door bell button that does not stay latched on etc.
rabittn, I will try your code snip, I don’t understand it yet, but I’ll try it
Actually I think were at opposite ends of what I want to do perhaps. I don’t want the HA interface to set a switch off after I press a button on the interface, I want the HA interface to set a sensor to off in HA after a few seconds delay after the ‘on’ event, because the sensor has no ‘off’ transmission of it’s own.
I’ll continue to tinker with some ideas.
Thanks. Yeah I’m not sure I’m clear about it yet, but I can try the script (which I’ve never done before) and see if it does what I think I’m looking for
I’ll reword the issue just in case, and use my physical example.
I have a couple of door and window RF transmitter and want to fit many more, they communicate to HA via an 433Mhz RF hub. The RF hub only sends an ‘on’ to HA for each entity, and never an ‘off’ (because these RF transmitters have only one code). HA hassio GUI shows the door opened forever unless I manually ‘off’ it in the hassio gui. Then it’s ready to be tripped again, and do automations. I’d like either the RF hub or HA to ‘reset’ the entity back to ‘off’.
I’ve just reflashed my Sonoff RF bridge to Tasmota FW (from Espurna FW) and I’ll see if I can recreate the entities and try the script on them. I also have a DIY RFLink hub which I’m playing with.
I would start your own topic. What you are looking for is a binary sensor to automatically switch back to off. This topic is more about momentary switches.
What your are looking to do can most definitely be done. Tag me in your new topic and we can have a look.
I 100% support this, earlier when I used Domoticz we head something called “Push on/off button” that just sendt on or off commands, it was super useful and something I miss in HA.