Node Red - ZHA - Hue Smart button

Hi - just starting to get into node red after watching a few guides on YouTube but I need some advice.

I have a few hue smart buttons that’s are connected to a conbee 2 as they give more flexibility than connected to the hue hub, but I can’t see these in node red, all I can see is the power level entity.

Any ideas how I can use the button presses to trigger a flow?

Thanks

With ZHA the buttons dont have an entity but they actually fire an event.
In NodeRed you need to listen to all events from HA and find the button press event. Then filter out for this.

Example:

[
    {
        "id": "73b4c04f.5ee1f",
        "type": "switch",
        "z": "d4113bbe.91f4a8",
        "name": "",
        "property": "payload.event.device_ieee",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "00:15:8d:00:01:e5:f4:e6",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "00:15:8d:00:00:ed:4e:8e",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "00:0d:6f:ff:fe:0d:25:51",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "ec:1b:bd:ff:fe:9e:c2:ef",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 4,
        "x": 270,
        "y": 3460,
        "wires": [
            [
                "5addff20.daded",
                "87896dc2.1b1d6"
            ],
            [
                "8afc13a3.5bd63",
                "9e3b1272.ab181"
            ],
            [
                "217fff0c.2073b"
            ],
            [
                "8776965f.9e0db8"
            ]
        ],
        "outputLabels": [
            "Wohnzimmer Button",
            "Schlafzimmer Button",
            "Wohnzimmer Ikea Remote",
            null
        ]
    },
    {
        "id": "b973847e.4b4a18",
        "type": "server-events",
        "z": "d4113bbe.91f4a8",
        "name": "",
        "server": "2fba4297.e4145e",
        "event_type": "zha_event",
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "waitForRunning": true,
        "x": 110,
        "y": 3060,
        "wires": [
            [
                "73b4c04f.5ee1f"
            ]
        ]
    },
    {
        "id": "8afc13a3.5bd63",
        "type": "switch",
        "z": "d4113bbe.91f4a8",
        "name": "Single / Hold",
        "property": "payload.event.type",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "shortpress",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "longpress",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 510,
        "y": 3460,
        "wires": [
            [
                "f5c92370.b70d5"
            ],
            [
                "64fa939a.68648c"
            ]
        ]
    },
    {
        "id": "2fba4297.e4145e",
        "type": "server",
        "name": "Home Assistant",
        "legacy": false,
        "addon": true,
        "rejectUnauthorizedCerts": true,
        "ha_boolean": "y|yes|true|on|home|open",
        "connectionDelay": true
    }
]
1 Like