Philips HUE Smart Button - 5 press actions + hold-to-dim

I’m on version 2022.8 if that makes a difference. Will try to delete everything and reload… maybe I should go back to an old back up.

Also I don’t know if this make a difference or not but all the automations that I created up to now I can’t delete them… so instead I’ve disabled them and left it… is there a way to permanently delete them?

I generally wait until the later half of the month to update HA unless I feel like beta testing :grin:

Let me know how you get on, it’s possible 2022.8 may have broken my blueprint but I won’t update for a week or so

1 Like

hahaha i’m still fairly new to HA and i’m only now starting to get that beta tester feeling! :sweat_smile: will keep trying and check again later in the month.

I realised another thing this blueprint lacks compared to hue app functionality is that hue app activates each scene change on each press (which also acts as feedback so you know how many presses you’re on)

I’ll work on adding that in as an optional feature :slight_smile:

2 Likes

what info do you need for zigbee2mqtt?
Z2M is sending this to mqtt if you short press the button:

this is a 2 second press:

longer press:

state_changed example:

event_type: state_changed
data:
  entity_id: sensor.kueche_button_action
  old_state:
    entity_id: sensor.kueche_button_action
    state: "on"
    attributes:
      action: ""
      battery: 100
      last_seen: "2022-09-08T22:23:33+01:00"
      linkquality: 191
      update:
        state: idle
      update_available: false
      icon: mdi:gesture-double-tap
      friendly_name: kueche_button_action
    last_changed: "2022-09-08T21:23:33.342605+00:00"
    last_updated: "2022-09-08T21:23:33.344831+00:00"
    context:
      id: 01GCFFS5B0NHQR6GAPYWSS4W1D
      parent_id: null
      user_id: null
  new_state:
    entity_id: sensor.kueche_button_action
    state: ""
    attributes:
      action: ""
      battery: 100
      last_seen: "2022-09-08T22:23:33+01:00"
      linkquality: 191
      update:
        state: idle
      update_available: false
      icon: mdi:gesture-double-tap
      friendly_name: kueche_button_action
    last_changed: "2022-09-08T21:23:33.345652+00:00"
    last_updated: "2022-09-08T21:23:33.345652+00:00"
    context:
      id: 01GCFFS5B1X8PBRJTYFH2FPRRK
      parent_id: null
      user_id: null
origin: LOCAL
time_fired: "2022-09-08T21:23:33.345652+00:00"
context:
  id: 01GCFFS5B1X8PBRJTYFH2FPRRK
  parent_id: null
  user_id: null

What I need is the output from the /developer-tools/event page

Go to that page, in the Listen to events box put the z2m event listener (I’m not sure what it is but you should see it as an active listener on the right)

Once it’s listening press the button a few times and do long holds etc

i think it’s not an own listener, status updates are coming from MQTT/mosquito broker

i know that event listener from deconz_events as i used deconz before… but there is no Z2M listener.

You’re right, I’ve just had a look at the docs and it just sends MQTT events, there is no specific HA event listener for it.

Unfortunately that would require me to completely rework this blueprint and I don’t use it myself to test with either!

You’re on your own I’m afraid :slight_smile:

Hi. Where are the Blueprint Additional Notes regarding the helper text?

Hi @TheHolyRoger Where are the blueprint additional notes that you mention above regarding the helper text to get this working?

Sorry my documentation probably isn’t that great :slight_smile:

All you need to do is create a text “helper” and then pick that new entity you create in the blueprint

1 Like

Got it now, and implemented and it works pretty good. Had a couple of false positives on single press, where button lights up but automation doesn’t fire but that’s only happened twice.

Thanks for the blueprint as I was getting peed off with not being able to integrate the button into HA.

Using it with ZHA btw.

No worries you’re welcome! I might try ZHA soon as I’m getting tired of the 1 second limitation with the hue bridge/integration.

1 Like

Hello !
Thanks for this blueprint.
I am using ZHA and I have a little issue, whenever I turn on multi press events, the short press action is not triggered for some reason. I can make it work if I put 1ms for the multi press delay, but then multi press events are unuseable.
I tried 2 buttons that I bought together and I have the same issue

Here are the zha events I get for a single press on the button :

Événement 2 déclenché 21:14:

{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:17:88:01:08:94:f8:09",
        "unique_id": "00:17:88:01:08:94:f8:09:1:0x0006",
        "device_id": "a94155be159cc7f134cc664affafd433",
        "endpoint_id": 1,
        "cluster_id": 6,
        "command": "on",
        "args": [],
        "params": {}
    },
    "origin": "LOCAL",
    "time_fired": "2022-11-07T20:14:39.826789+00:00",
    "context": {
        "id": "01GH9VP4PJRHN0ZMGHXAB0HGA4",
        "parent_id": null,
        "user_id": null
    }
}

Événement 1 déclenché 21:14:

{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:17:88:01:08:94:f8:09",
        "unique_id": "00:17:88:01:08:94:f8:09:1:0xfc00",
        "device_id": "a94155be159cc7f134cc664affafd433",
        "endpoint_id": 1,
        "cluster_id": 64512,
        "command": "on_press",
        "args": {
            "button": "on",
            "press_type": "press",
            "command_id": 0,
            "args": [
                1,
                3145728,
                0,
                33,
                0,
                0
            ]
        },
        "params": {}
    },
    "origin": "LOCAL",
    "time_fired": "2022-11-07T20:14:39.711377+00:00",
    "context": {
        "id": "01GH9VP4JZ8WFBDK8WEYWVV0SN",
        "parent_id": null,
        "user_id": null
    }
}

Événement 0 déclenché 21:14:

{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:17:88:01:08:94:f8:09",
        "unique_id": "00:17:88:01:08:94:f8:09:1:0xfc00",
        "device_id": "a94155be159cc7f134cc664affafd433",
        "endpoint_id": 1,
        "cluster_id": 64512,
        "command": "on_short_release",
        "args": {
            "button": "on",
            "press_type": "short_release",
            "command_id": 0,
            "args": [
                1,
                3145728,
                2,
                33,
                1,
                0
            ]
        },
        "params": {}
    },
    "origin": "LOCAL",
    "time_fired": "2022-11-07T20:14:39.527602+00:00",
    "context": {
        "id": "01GH9VP4D76MAJTFJ6FGVS1951",
        "parent_id": null,
        "user_id": null
    }
}


Ok, I have fixed my own problem.
Turns out you can’t really use short press and multiple press at the same time
But anyway, for what I wanted to do, “Initial Press” will do fine.

I updated the blueprint with an optional setting to always fire the first button press when you cycle through - with this enabled I think it’s very close to mimicking the original HUE behaviour now :slight_smile:

I am new to HA and I installed your blueprint. When I am starting it. I am able to select a device. But I cannot select an entry here: (Required) Helper - Last Controller Event.

As far as I understand, I have to create a manual entry here. Can you please explain me what exactly I have to do here?

Thank you.

Hello !
Yes, you need to create a text input in Settings => Devices & services => Helpers
Name it whatever you want and then select it in the blueprint.

Thank you.

After rereading, I just realized that the Blueprint does not work with Zigbee2MQTT. I use Z2M in combination with a Conbee II stick. Does anyone have a solution for Z2M?

Hi all,

Anyone have a working Zigbee2MQTT script?