Different behavior when "pressing" a button on Device page versus physical device button

I posted this on the Discord server but I suspect I may have jumbled too many questions and details and generally made it difficult to answer. I’m posting here in a more concise way that will hopefully result in others understanding my issue.

I’m fairly inexperienced (not new - had it for years) to Home Assistant. I’m currently confused by the different behavior or a smart switch when invoked in the HA UI and the physical device. It’s a Lutron pico remote.

When I use the blue “Press” button on the Controls card of the Device page I see entries in the Activity log like:

Note the 3rd activity “Lights Up” then there are what I would call two “events” for button press and button release.

Compare that to what I see when I press the “off” button on the physical remote, this is what I see in the Activity:

The same two “events” (makes sense) but not the “Lights Up” entry.

So my first question would be: Can anyone explain why there are different activities logged when the button is pressed in the UI versus on the physical device?

This is all related to a problem I’ve having with an Automation, but I’ll post that separately to avoid conflating multiple issues like I did in Discord.

Because they are different buttons.

That doesn’t help me understand the situation any better.

One is a software-defined button and the other is a physical button. There is no “rule” anywhere that says they have to follow the same code, just as long as the end result is correct.

Thanks for the additional information. I suppose I assumed (yeah, I know) that a button press, whether a physical button or a software button would follow the same execution flow in the HA core. Yes, they came from difference sources, but really they represent (or should) the same thing and thus would exhibit the same behavior in the system.

In this case I would say the result is incorrect, but I also know that I’m too new to claim “bug!” so I won’t, not yet at least.

I’m not just being pedantic; this issue is manifesting in a non-functional Automation where the button “press” isn’t happening with the physical button and thus not triggering my Automation. No doubt there is a workaround or I’ve made a mistake in my Automation, but it’s illogical behavior, IMO. I’m going to post separately about the Automation so this thread stays on-topic. Thanks again.

Consider this @mabee_steve: you have multiple locations that trigger an automation. One is in the attic, another is behind the refrigerator, one is somewhere in your teenagers’ room. If you do not distinguish between which button is causing the trigger, then you will have to go to the three locations a whole bunch of times to figure out which button is causing the problem. (Snow will fall in Hades before one of your teenagers would be effective in helping out.) So, actually, it’s a great feature!

I agree about the kids! But then you lose me, I don’t understand your point.

I’m not claiming that any button press from any device should trigger an Automation or anything like that. My issue is that the software representation of my device (singular, 1:1 relationship) does not behave the same in the system when you push it’s buttons. As an analogy it would be like a software version of a remote control as an “app” on your phone increasing the volume 5dB with each click where the remote increased 1dB with each click. Inconsistent. Perhaps I missed your point and I apologize if that’s the case.

Let’s see if I understand now. You have two buttons. One turns on the lights and the other does not.

HA is a TOM (Totally Obedient Moron) and will do exactly as it is told. (You must converse in its language. If you don’t, it will have a hissy-fit or you will be ignored)

Did you tell HA that it has to listen to both buttons? That is two triggers. Can you post the YAML (put triple gravè, key to the left of 1 ``` in the line before and the line after your YAML code)

Note, I would like not to be pedantic, but HA is a mystical place full of encantations obtuse. Woe be it to the uninitiated to get an indent incorrect.

Logical vs physical. With automation they can be separated, substituted, and controlled differently.
That is what makes it so powerful.
Maybe the integration doesn’t suit your requirements?

No, I think the Integration is fine. I’m just not “getting” something about this and I am explaining it as best I can, but the replies so far haven’t really addressed my question. I must be explaining it poorly or I’m not understanding the replies.

I’ve read the Lutron Caseta documentation and reviewed the code. I just don’t understand where the two entities in the Controls card on the Device page are coming from. Are they even Entities? What is a “Control”, what these special things??

@OldSurferDude My issue is that pressing the virtual button in the HA UI causes different things to happen then pressing the physical button.

You have to change your code to match your expectations.

Break it down:
You have a device with multiple buttons.
What happens when you:
Don’t touch them?
Press them down?
Release them?
Press them multiple times within a short period?
Press more than one at the same time?
Press them in a particular sequence like you do with a combination lock?

I figured that, but I’m not looking for a solution so much as I want to understand why I’m seeing what I’m seeing. I don’t get it and I want to understand, not just “make it work”.

You may need to not only closely read the user manual from Lutron (that tells you how the vendor designed it to work), but also the source code for the integration to determine what additional or changed functionality it performs.

For the six different types of button actions in my previous post, is there corresponding code in the integration for each? If so, does the flow, actions initiated and results match your expectations? Does it match the ones described by the vendor?

What HomeAssistant integration of Lutron are you using?
Can you point to the actual GitHub source code pages for it?

I first saw your reply and didn’t notice the list of button actions, I just saw the first sentence and took it as kind of snarky, but now I see there is more to your post.

To answer your question though, yes, I believe my Automation is designed and built to take into account the necessary actions and permutations. However, I based this on access to the “Mystery Event Raised when the Press button is press” from an Entity State Trigger, but that doesn’t seem possible.

This all comes back to the fact that the physical button presses don’t raise the same events as the software/UI button presses and that seems wrong to me. I’ve looked through the code and nothing obvious is jumping out at me.

I can fix my integration in 2 minutes by changing from State Triggers to Device Triggers. It just annoys me because it doesn’t seem like that should be necessary and makes me suspect I’m missing something.

Look at the code at

Note lines 27 down. Follow those to their appropriate subroutines to see what happens.
Now imagine the event you are initiating, such as a simple button press and follow the code flow to see what happens.

Note: In a programming/development environment, you can set breakpoints and step through the code to follow what is happening, and examine the values as they change (or don’t).
.
.
.
What have you named your device? Each entity? Are they inadvertently similar or identical?

It is so that you can distinguish between a physical action, an automation, or a dashboard. See: How to use context

This can be quite handy. e.g. A light that is activated by movement (automation) may have different actions than if you pressed the physical button, like not turning off automatically if it was a physical press, only for movement.

I’ve just stumbled across this and am mentioning it here, just to destroy your faith in the Luteon integration working as expected.

HI, Some integrations can add entities which are not normally generated from your Device, that is if the Device actually have “features” which is not “normally” used.
On the other hand an Integration might not Support All features a Device Have.

The Best way to know your Device, ( and integration ) Is, Open Developer-Tools in 1 view, and Device-Page in another.
Then Click/Press a button, se what happens in Dev-Tools vs Activity, and Release, do same. Some seems like “Actions” (state change) and other is “Events” which is/can be 2 different things.

That you have this “peculiar” “Press”, could be that your “Button/Remote” have i.e a “Hold” feature, but maybe the integration don’t support this

So my suggestion is , read up upon Your device, and Use Dev-Tools to understand how it works in the Integration/HA

A “Press” is usually an Event, like Hold/Release, an Action is a State-change.
An i.e Remote-Button register an Event, the Device it’s “Conneted/Binded To” Register A State Change (Action)
In other words, The (Event) Press(on the remote-button), triggers a State-Change on the “connected” Device (Action)

Just a “funny” thought, as you have Press&Release, (Press can turn on 1 light, and as you have to Release the press Button ( when you need to pee ), then the release can turn off the light again, or turn on another )
Your Button on the Device, is a Switch on/of, action
A dashboard “Button” or remote Button don’t change their State. i.e on/off, in that case they are defined as a switch.
They fire an event, so when you Press, it goes from “Release Off” to Press, and when you Release it goes back “Press Off”, 2 events fired, 3rd is the Action performed (lights UP) Thou it could have said to What ?
If you HOLD your Button Down for 3 seconds, you should see this in the activity, and the 3rd come immediately after you Release