Zigbee button pairs as Alarm Control panel

Hi all, I grabbed a zigbee button through Amazon Vine that I assumed would function as a basic zigbee button, but it pairs as an Alarm Control Panel, which apparently also creates it’s own control panel and can’t integrate with other alarm types in HA.

I’m interested in using this as a normal button, but not sure if I can change the device class/domain from Alarm Control Panel to Button.

Does anyone have any help with this? I’m not finding good documentation on whether this is possible or how.

Edit to add product link… The reviews are mixed between people with the same issue with me and a few who said it works with HA. None of the ones that say it work give further info. I’m curious if they’re using Zigbee through Tuya, while I’m using ZHA.

Go to Developer Tools> Events and type zha_events in the field under “Listen to Events” then click “Start Listening”. Press the zigbee button and see if it creates an event.

I get no events. I’m not sure if I’m failing at this simple process though. I tried a few other zigbee devices and got no events as well (a group of smart bulbs and a smart outlet). The button’s state changes from disarmed to triggered when I press it.

Sorry, I had a typo… that should be zha_event.

While you have the listener running you should test double-press and hold as well as just single press. I don’t see any mention of those on the Amazon page, but it doesn’t hurt to try it and you may find out you got more functionality than expected.

What exactly are you trying to do…? If you have a working state change, then you have everything you need to trigger automations.

I actually had tried zha_event and events. I caught the mistake… should have mentioned that. Still no success with anything showing up under events.

As for what I’m trying to do, the button will set the alarm state to triggered, but then I have to go in and deactivate it manually (which requires a pin). So I’m not sure how I’d go about using it in a way that is actually useful.

I did manage to get an event out of it, by listening to all events. Here’s what I get out of it.

event_type: state_changed
data:
  entity_id: alarm_control_panel.smart_button_alarmcontrolpanel
  old_state:
    entity_id: alarm_control_panel.smart_button_alarmcontrolpanel
    state: disarmed
    attributes:
      code_format: text
      changed_by: null
      code_arm_required: false
      friendly_name: smart button Alarmcontrolpanel
      supported_features: 15
    last_changed: "2023-07-14T21:16:47.572114+00:00"
    last_updated: "2023-07-14T21:16:47.572114+00:00"
    context:
      id: 01H5B46W2KTTN9VWYVFGG4B8CJ
      parent_id: null
      user_id: 89915f2570a04b4abf66237e5d91c3a8
  new_state:
    entity_id: alarm_control_panel.smart_button_alarmcontrolpanel
    state: triggered
    attributes:
      code_format: text
      changed_by: null
      code_arm_required: false
      friendly_name: smart button Alarmcontrolpanel
      supported_features: 15
    last_changed: "2023-07-14T21:16:57.052980+00:00"
    last_updated: "2023-07-14T21:16:57.052980+00:00"
    context:
      id: 01H5B475AWM2HVFJTM2W9HYKHV
      parent_id: null
      user_id: null
origin: LOCAL
time_fired: "2023-07-14T21:16:57.052980+00:00"
context:
  id: 01H5B475AWM2HVFJTM2W9HYKHV
  parent_id: null
  user_id: null

It a bit of a hack, but you should be able to automate the reset…

trigger:
  - platform: state
    entity_id: alarm_control_panel.smart_button_alarmcontrolpane
    to: "triggered"
condition:
action:
  - service: alarm_control_panel.alarm_disarm 
    target:
      entity_id: alarm_control_panel.smart_button_alarmcontrolpanel
    data:
      code: 1234example
  - service: example.some_service_you_want_the_button_to_fire
    data: {} 

Thanks! That works perfectly to disarm it. I appreciate you providing the code. I knew it could be done, but I’ve never dealt with alarm stuff in HA, so I have no sense of familiarity with entity types, so it would have taken me an hour or so to sort through it.

I was hopeful this button would support double click and long click, but I’m sure I can find a utility for it. I’ll prob just put it on the dog food container and tell whoever feeds the dog to push the button and have HA notify us that it happened. Our dog is a freaking liar and that’s something I’ve wanted to address for a minute.

You can use wait_for_trigger or wait_template actions to recreate multi-click functionality. The need to reset after every push makes it a little more complicated, but it’s doable. If you search the forum for “double click” you’ll find a number of approaches/examples.