ZHA Events

I am embarrassed to ask… but here goes. After so much reading I am unable to find where I can view ZHA events? I’ve recently added a Loratap SS600ZB and I want to watch the events as I press the buttons, so I can workout automations etc. I assume this is possible via the ZHA events?

Advice/patience with a newby question very much appreciated.

Developer Tools => Listen to events ‘zha_event’

2 Likes

@sholofly thank you sir, appreciate the help.

I started listening to the events, but where do they show up? In the logs?

On the same screen when you trigger a sensor

Sorry made a typo: it’s zha_event without the s on the end.

1 Like

it will be right below where you “start listening”:

1 Like

Ok, so zha_event worked… thank you all, really do appreciate your help :smiley:

Now I need to workout the rest… how hard could it be :yum:

Good luck m8, it’s really worth it :slight_smile:

1 Like


Hue switches come with events, which can be logged and viewed from dashboards.

With zigbee switches, i dont have “Events”. Can i program/add similar events?

yes, as the thread suggests, i can “listen” to “zha_event”, but thats not something i can put to a dashboard, right? ultimately, I want to see when each of my buttons were used how, on one widget.

I share the emberassment of the initial fellows noob concern.

thanks and best,
koray

Good question. What you’re after is called a “logbook” in HA. Each event is saved in the Recorder database (unless you’ve excluded that entity.) You can look at them several different ways.

Probably the easiest is to just click/tap on the switch, then click/tap on the “history” icon (little bar graph in a square) on the upper right. This will show you the recent events for that entity, and you can change the time range to see more.

Hopefully that will get you started with some search words, anyway. As for putting the events right on a card on a dashboard, that’s not something I’ve done. I can see where you might want to, I just never felt the need. Maybe there’s an easy way, and I’m just not aware of it.

1 Like

Thanks, I must be noober than I thought :slight_smile: I have taken many clear screenshots unfortunately i am allowed only 1 per post, which is a bit harsh.

  • i am aware of the logbook (both the dashboard card and on info screen). For the logbook card i must select an entity. i have the event entities only for hue switches. for my ikea switches, all i have is “identify” and “battery” entities.

  • The logbook widget on device info shows some interesting events were fired, so not all hope is lost. But this is the only rectangle i can manage to see this info:

  • although i remember seeing it before, i am still looking for the “little bar graph in a square”. where i managed to see history, it allows me to select the switch device which results in “no state history found”.

  • i still would like to create/simulate what hue does with “events.hue_switch_1_on”. I am not sure if this is a separate problem or one problem is the result of the other.

It is possible that I am missing a key concept, please point in the correct direction :slight_smile:
Koray

That appears when I click/tap on the name of a switch in a dashboard. It shows “No state history” found when there isn’t any (like if I excluded it from Recorder, or it hasn’t changed in a while and rolled off.)

I don’t know a way to display that in a card.