HA does not show clicks for Shelly 1 button

I am new to HA. I got 23 shelly devices loaded in HA after some time. Now I want to do the next project.

The I tried to get an automation for the shelly button to activate a non shelly device. But I get no actions after setting up clicks for 1,2,3,long press.

This other issue describes the problem exactly.
Stuck on Shelly 1 button [SOLVED] - Configuration - Home Assistant
Community (home-assistant.io)

Then it suddenly says solved. But How?

Does anyone know how this problem was resolved?
I have read the text a few times and don’t understand how the problem was solved.

I am using the latest version of HA 11.3 on a Raspberry pi.
Would appreciate any assistance so I can move forward on this project.

Ash

The shelly button is probably using the event bus of HA and not the state machine.
This means you need to open up the developer tools in HA and click on the event tab.
On the event page you then enter * in the listening field to listen for EVERYTHING.
Click the listen button and then the shelly button and quite quickly the listen button again to stop the listening.
Now you will have a list of events and you need to find those for the Shelly button
Once you found it then you can replace the * with something from the captured shelly button event to filter everything else out.

With the captured events you can use an event trigger in your automations.

Wally
Thanks for responding. I followed the instructions and got some events from scripts.
I waited five minutes. Checked the button was triggering the lites but the only scripts I got were the following for the lites going on/off. Nothing about press once/twice or button clicks.
Stuff about sun.sun. other lights, device tracker. Are the clicks in this script or am I missing something?
But nothing in the 30 events about the Shelly button I was pressing.
Any suggestions I what I try next?
Ash
=========== Extracted Script ====================
event_type: state_changed
data:
entity_id: switch.travel_photos
old_state:
entity_id: switch.travel_photos
state: “on”
attributes:
friendly_name: Travel Photos
last_changed: “2024-01-18T07:05:05.556609+00:00”
last_updated: “2024-01-18T07:05:05.556609+00:00”
context:
id: 01HMDP6FRMVZGS5Q5NR5E9NTJ2
parent_id: null
user_id: null
new_state:
entity_id: switch.travel_photos
state: “off”
attributes:
friendly_name: Travel Photos
last_changed: “2024-01-18T07:05:38.553511+00:00”
last_updated: “2024-01-18T07:05:38.553511+00:00”
context:
id: 01HMDP7FZS1V1BY80VFVS32FRJ
parent_id: null
user_id: null
origin: LOCAL
time_fired: “2024-01-18T07:05:38.553511+00:00”
context:
id: 01HMDP7FZS1V1BY80VFVS32FRJ
parent_id: null
user_id: null

====================================

30 events only in 5 minutes?
Sound like HA is cutting the list off.
The button press should be pretty much instantaneously, so click the button and stop the listening and then look through the list again.
From the post you link to in the beginning it looks like the event you should listen for is shelly.click, so try to put that in the listening field instead of *

If I stopped listening to events instantly, I would have nothing.

These events take a minute to come up in the listening

That is listening to *

Is there another problem where HA not listening to me? Is there another listening setting in the HA configuration?

I tried listening to shelly.click (put in the field Listen to Events) but I get no events.

I have the scripts set up in Shelly and they work with the button. I also have them set up in HA and they work (on the lites) when you run them.

Below is a subset of the event log. (Is there an easier way to extract this?) (or a way to filter the log?)

I ran both the HA scripts and the button.

The button seems to produce Event 11 from my testing

The HA scripts seem to produce Events 12 & 10.

I then disabled the events in Shelly App. The button pushes do not do anything and present no HA events after waiting a few minutes.

So HA is not getting the clicks from the shelly button when the automations are only in HA.

Any suggestions to progress this?

Ash

Have you restart HA after adding the shelly button?
If you have then the page where you enter * in the listening field should have a shelly.click listed in the list to the right.

Shelly button was loaded over a week ago. It has the the four automations set up with basic turn light on/off. But nothing works when I press the buttons.

The list to the right in the events active listeners shows shelly.click (3 listeners). But when you click on it nothing happens. After a minute i get the following (see image).

Is there anything I can look at?
Ash

I also found this in the log file from yesterday (see image). No clicks showed up in the log file today when i tested.

Does this offer any insights?
Ash

You have the shelly.click listed in the right side.
Click it and then listen for events when you click the button.

I tried that as you can see in the image below… But it will not let me start listeneing until I enter * in the Listen to field. Then it show no click events and gives me other events eg as shown, sun.sun etc. No click events.

What shoud happen?
What can I do to make that happen as the automations are in HA but on clicking the button, the lites do not turn off/on.

Any suggestions?

I did find this in the log book (see ist iomage and from the listening I found these entries for the travel lites. But no mention of the laundry lite, which is my other lite for testing.

Why it is rebooting is a mystery to me. The lite goes off/on in google home and in the shelly app.

image

I am at a loss to why you can not see the events.
It is quite normal for it to become unavailable all the time. It is done to save power. You can change that on the button setup, but it will quickly kill the battery.