OK I will make the enhancement. I’ll post here when the driver update is available.
Optimal. I am sure it will serve many end users. Thank’s for your job
Driver update has been pushed out containing these enhancements:
- Virtual switch devices have preference setting to change dashboard icon to either plug or switch
- Virtual contact devices have preference setting to change dashboard icon to either light or contact
Notes:
- These features will only be available for new devices created with this updated driver.
- It may take a few minutes for the icon to update after the preference setting has been changed.
perfect. it works.
I have the ability to change setting from switch to plug but icon is not changing. It’s been about an hour since I made the change. Tried force stopping app and clearing cache. No luck.
Any thoughts?
Try changing it back to switch; wait 10 minutes, then change back to plug then see if it changes. Sometimes setting changes don’t work right.
To change icon appearance, close app and open again. It will change.
@TAustin could you make your momentary button available to use as a switch in Alexa? Thanks for all your hard work it really is appreciated.
To make it even more perfect, you should make sure to hide the contact capability if you choose to use light, that is, it shouldn’t show open / closed under the icon but rather off / on.
So you would want to add a switch to the device?
Is this the behavior you would want?:
Whenever the momentary button is pressed, the switch would toggle from on to off or from off to on. Whenever the switch goes either from on to off or off to on, there would be a momentary button press.
I don’t think I could do this using the standard contact capability (which the device still is, regardless of the icon). I believe contact capabilities will only support open/close states, but I’ll confirm this.
Assuming I’m right, In order to have the flexibility of also supporting on/off It would have to be implemented as a custom capability and then the device would no longer be recognized by Alexa.
The momentary button doesn’t show up in Alexa. The momentary button when pressed executes then goes back into standby ready to be pressed again. To achieve this using open close switch i have to create two routines, one to switch to open and then another to switch back to close to be able to use it again. Having the momentary button show in Alexa would mean i only need to create one routine. I hope this makes sense.
So you’d want the button to temporarily turn on the switch, and then to turn it off again after a short delay. But what if you flip the switch either manually or through an Alexa routine? Would you want that to trigger the button, or just do nothing?
Yes the button to turn on the switch (execute the Alexa routine) and then return to standby ready to execute the routine again if pressed.
I’m not sure if this would solve your situation or not. I think my situation was similar to yours. Prior to this driver, I had to use a contact device and at least one switch along with some logic in WebCore in order to get it to work. Now, with this driver, my automation just turns on the contact when the condition is met. When I selected the contact, since it has the methods of a switch included, I just selected the option to turn it off after 10 seconds. Effectively, it’s a contact device with switch properties that can act like a 10-second momentary switch. All to get an announcement to go through on my echo’s which is working perfectly.
My situation may be different because I am not manually toggling the contact sensor, I’m having the automation do that as a result of a set of conditions.
Thanks Jeff that is exactly what i was trying to say. I have used the turning off option with the v contact but it is another step in the process where as the momentary button eliminates the requirement to do it.
New driver update!
Given the request from @AllenP to make the momentary button useful with Alexa, I have added the following features to the virtual momentary button:
A switch has been added to the device and is shown on the device details screen. It will be flipped when the momentary button is pressed, based on user preference settings described below.
Two new device preference settings have been added to virtual momentary button devices:
- Behavior: selects what happens when the button is pressed: either turn the switch on, and then after delay, turn it back off… OR turn the switch off, and then after delay, turn it back on.
- Delay: the number of seconds to delay before returning the switch to it’s previous state
Delay default is 2 seconds
Behavior default is - turn switch on, then off after delay
Flipping the switch manually from the mobile app has no effect other than to change the state of the switch.
If the switch is already on and you have the behavior configured to turn on, then off after delay, then pressing the button will result in the switch just turning off after the delay.
@orangebucket This feature is along the lines of what we talked about some weeks ago.
I think these additional configuration options will allow for some creative uses of this virtual device!
I tried the new momentary button. Alexa discovered fine and device can be used in the “then” section of Alexa routines but can not be used as the trigger. I think it will need the contact capability instead of switch for that to work.
Yes the momentary button no longer works with Alexa, she turns the switch on, and the switch stays on permanently, and nothing happens. The switch should trigger the button no?
Good job on momentary button. It works as NO/NC relay, and I like delay option. This can be used for gates as lock control, to keep the gate lock open for 10 or 20 seconds.