#ZHA: What is the correct way to push events out?

1 messages · Page 1 of 1 (latest)

slender storm
#

I have ZHA set up and working, with a button paired.

When I was using Zigbee2MQTT, getting events "externally" to Home Assistant was as simple as listening to the correct topic.

I would rather not have to run an automation to publish ZHA events to other applications - is there a better way to broadcast information FROM Home Assistant out to other services on my network?

Use case:
I have a service running on another box that was originally listening to an MQTT topic, that then performed some tasks for me when I pressed a button.

Yes, I could write an Addon or use Node Red but having an event bus was far simpler.

true dome
slender storm
#

@true dome huh, I wonder what the difference is

true dome
#

States vs events

slender storm
#
#

Thanks @true dome, I think I am on the right track

#

That's a pity, the button doesn't seem to have a state.

#

Whereas the zigbee temperature sensor does.

true dome
#

It probably emits an event

#

I think that's how ZHA does it vs creating entities

slender storm
#

yeah, one of my issues there is the statestream has nice include and exclude configuration, eventstream doesn't.

true dome
#

But now events can also create entities

#

It looks like maybe ZHA doesn't support that yet

#

You could probably just have a single automation that listens for zha_event and published to MQTT with whatever scheme you want

slender storm
#

how heavy is that, CPU wise?

#

actually, it's probably better than streaming all events to MQTT...

true dome
#

How many events do you have?

#

Listen and see