ZHA Zigbee switches are not shown

I have the problem that various Zigbee Scene switches or Smartbuttons are not visible after installation. This happens with switches from different manufacturers, e.g. IKEA Styrbar, Moes, Like Sun. Only the device firmware and battery are shown, but not the actual devices for the switch. what can be done?

What do you see in the device config page (settings → devices & services → Zigbee Home Automation → xxx devices → click a switch.

This is one from mine:

A Zigbee button will not have a “controls” card on the device info page - all you will see is the “diagnostic” card. Buttons do not have a state.

I’ve learned that button entities don’t usually exist with Home Assistant. Buttons trigger events. I managed to switch an output in an automation with such a push-button event. How can I intercept such an event via REST API?

1 Like

Is it really that difficult? I just want to read a Zigbee Scene switch via the Rest api. Does no one really have any idea how to program or set this up?

looks like I misunderstood what you meant by a switch.

I don’t however completely agree with @Stiltjack - my aqara ‘button’ shows as a binary_sensor with the status corresponding to on or off - however I accept this is via a xiaomi gateway - ZHA may be different.

@Konrad1304 - where has REST come from? Or rather - what do you want to happen when the button is pushed?

@walaj’s picture shows the best way to integrate these devices - press the (+) button next to automations. Follow your nose.

Another easy way to create automations from these devices is using ‘Switch Manager’ which you can install via HACS.

1 Like

Indeed. You need to create automations that use events for buttons and remotes. A tip is to search for that specific product under Blueprints Exchange as there will usually exist a Blueprint or more that is a pre-made automation blueprint for that specific product.

To understand my problem:
I use Home Assistant purely as a gateway to the periphery. A higher-level controller reads sensors and controls actuators via the REST API. I do not use automations within Home Assistant. This all works very well. But I don’t get any information about Zigbee buttons.
As you can see with the Ikea Styrbar added here, Home Assistant only creates entities for the battery etc., but not for the actual switch. In this respect, the button is also not readable via REST API.
grafik

I have managed to switch an output in an automation with the event of the switch.

I have not yet managed to read via REST API whether the button has been pressed.

Translated with DeepL.com (free version)

Also see api/events REST API | Home Assistant Developer Docs

@nickrout
Yes, thank you.
But: Access is only possible to the objects itself, but not to the property of the object. So I cannot determine whether the event has been triggered. Or am I missing something?
grafik

You might need to use the websocket api then.

@nickrout
Yes thank you, that might be a way to the solution. I have tried to connect via websockets - in vain. do you know a simple python example?

You can alternativly create a template button as those can act as a virtual device: