Yes, I am using the Cassetta integration.
Apologies for the delayed response. Out of town and realized that I had not set up remote access.
I see that the keypad is exposed for HA user to perform a button press. And reading through the Casseta integration documentation I understand that even though the keypad button is stateless, there is a timestamp which can be used in automations.
But… after looking and studying, I still don’t know how to set this up. I couldn’t find a blueprint but any advice in this area is greatly appreciated.
The documentation indicates you should use a Device Trigger.
When creating your automation, using the Automation Editor in visual mode, click Add Trigger, for the type of trigger select Device, then select your button device from the list of available devices, then select the kind of trigger action you want from the list of available triggering actions.
It will look something like this (this is what a Device Trigger looks like when it’s configured to detect an on
action from a device named Hallway).
Thanks. The challenge with the Lutron Keypad (from what I’ve read):
- It is an entity, not a device, and is stateless.
- In HA, the button can’t be used as a trigger directly
Somewhere there was information that there was a timestamp of when a button was pressed but I can’t determine where the time stamp is as an attribute or how to use it indirectly as a trigger.
The Home Assistant RA2 integration supports Lutron Pico remotes but it does not support them in an RA3 system, which is what I have.
Go to Developer Tools > States, find one of the button
entities like button.keypad_button_4
then post a screenshot of it including what is displayed in the State and Attributes columns.
Looks like that button
entity offers nothing to indicate when it’s physical counterpart is activated.
The button’s state
value displays a timestamp when it is pressed in the UI (or activated via a service call). It doesn’t report anything when its physical counterpart is pressed. Refer to the second paragraph:
Now I understand. It would be helpful if the button state was changed when it was physically pressed but there must be technical reasons for this.
My workaround is to create a phantom/virtual dimmer (or switch) in the Lutron Designer software that is not linked to any physical switch in the home. When the physical button is pressed the virtual dimmer is included in the scene. I can see the virtual dimmer in Home Assistant and then trigger an automation in HA.
Using this, my automation now is triggered by the virtual dimmer turning on which HA can see, HA then turns on the light for the stairs, waits 30 seconds, then turns off the stairs light and the virtual dimmer. I tested it and it works well.
The downside to this workaround is that I have devices in the software that are not linked to a physical device and it will cause a warning when the software design is transferred to the RA3 processor. (I also use a native Lutron integration to Apple Home and you can choose not to expose a device, which keeps it out of Apple Home.) On the other hand, the timer works!
My logic in programming the button was that if someone turns on the physical switch, they expect the light to stay on. However, if they press the “Leave Basement” button, they have no reason to assume the light in stairs will stay on. And that someone is my wife…
Thanks to all who have helped and a shoutout to Taras!
Lee
According to the documentation for the Lutron integration, a physical button press is reported as a lutron_event
.
An automation can employ an Event Trigger to detect a lutron_event
.
Yep, this is the correct solution.
Okay, I removed the Solution checkmark…
I think part of my confusion is that there are two Lutron integrations - one for the RA2 system, which is referenced by Taras and another for the RA3 system (which includes RA2) called the Lutron Caseta integration.
I have studied the Event Trigger documentation but it is still not clear if:
- The Caseta integration supports Lutron Events and
- How to use an event trigger in automations
Although I am very comfortable with automations using the GUI, some of the more advanced automations are more difficult. Any help or thoughts very much appreciated.
Go to the developer tools → events tab and subscribe to the event lutron_event
, then press a button. Look at the data and make your trigger, post it here if you don’t know how to make the trigger. We can help you create the correct trigger.
You’ll have to create the trigger in yaml.
I decided to try one more time to add a button automation again through the visual editor. I picked a keypad and then, magically, the triggers or button presses show. I tested it and it works.
Apparently two “keypads” are exposed for each physical keypad that you have. One doesn’t list any triggers and the other does.
So the lesson for me is “choose the right keypad!”
Taras and Pedro - I really appreciate the help you’ve given me on this!!
You’re welcome! Glad to hear it worked.