Botao Snzb-01 Zigbee

Tenho um botão zigbee, que ainda não consegui colocar a funcionar no meu homeassistant.
Já vi vários tópicos, mas ao criar um ficheiro .yaml com as configurações, não fica a funcionar.

Se eu for a ferramentas de programação, e começar a escutar zha_event, obtenho estes dados

Pressionando 1x

{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:12:4b:00:22:cf:90:55",
        "unique_id": "00:12:4b:00:22:cf:90:55:1:0x0006",
        "device_id": "3c01ec275c5887807a15a8fe5dc133c8",
        "endpoint_id": 1,
        "cluster_id": 6,
        "command": "toggle",
        "args": []
    },
    "origin": "LOCAL",
    "time_fired": "2021-09-25T07:02:58.213750+00:00",
    "context": {
        "id": "79d744ca2e83ef341f77abd66a23a542",
        "parent_id": null,
        "user_id": null
    }
}

Pressionando 2x

{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:12:4b:00:22:cf:90:55",
        "unique_id": "00:12:4b:00:22:cf:90:55:1:0x0006",
        "device_id": "3c01ec275c5887807a15a8fe5dc133c8",
        "endpoint_id": 1,
        "cluster_id": 6,
        "command": "on",
        "args": []
    },
    "origin": "LOCAL",
    "time_fired": "2021-09-25T07:03:34.761350+00:00",
    "context": {
        "id": "22621a3c9bbe2415a00eb5f460c2dd3e",
        "parent_id": null,
        "user_id": null
    }
}

Pressionando longo

{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:12:4b:00:22:cf:90:55",
        "unique_id": "00:12:4b:00:22:cf:90:55:1:0x0006",
        "device_id": "3c01ec275c5887807a15a8fe5dc133c8",
        "endpoint_id": 1,
        "cluster_id": 6,
        "command": "off",
        "args": []
    },
    "origin": "LOCAL",
    "time_fired": "2021-09-25T07:04:18.603742+00:00",
    "context": {
        "id": "03b57629faa0a7112c07c0a984b99759",
        "parent_id": null,
        "user_id": null
    }
}

Com estes dados, alguém me consegue ajudar como criar o ficheiro correto .yaml , para que o botão fique a funcionar corretamente?

Após inúmeras tentativas (e pesquisas), consegui criar um flow no Node-RED, para que o botão funcionasse.
Deixo caso alguém necessite

[{"id":"6a4f25f2.3d2c5c","type":"tab","label":"BotaoZigbee","disabled":false,"info":""},{"id":"4ad6f054.f3c1e","type":"switch","z":"6a4f25f2.3d2c5c","name":"","property":"payload.event.command","propertyType":"msg","rules":[{"t":"eq","v":"toggle","vt":"str"},{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":590,"y":260,"wires":[["0fdd2d2283fd910b"],["583989dc95a306f9"],["596f23652a6d0d32","04a0bd43dad4614b"]],"outputLabels":["Single Click","Double Click","Long Press"]},{"id":"7574d4ac.64adcc","type":"server-events","z":"6a4f25f2.3d2c5c","name":"zigbee event monitor","server":"666b1cf9.686414","version":1,"event_type":"zha_event","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"},{"property":"event_type","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"}],"x":160,"y":260,"wires":[["4e4f077.88b18f8","67dff8c3.23ea38"]]},{"id":"4e4f077.88b18f8","type":"switch","z":"6a4f25f2.3d2c5c","name":"Button A","property":"payload.event.unique_id","propertyType":"msg","rules":[{"t":"eq","v":"00:12:4b:00:22:cf:90:55:1:0x0006","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":420,"y":260,"wires":[["4ad6f054.f3c1e"]]},{"id":"fa465d17.b23ba","type":"comment","z":"6a4f25f2.3d2c5c","name":"Zigbee button payload List ....","info":"single click payload command = \"toggle\"\ndouble click payload command = \"on\"\nlong press payload command = \"off\"\n","x":180,"y":120,"wires":[]},{"id":"67dff8c3.23ea38","type":"debug","z":"6a4f25f2.3d2c5c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":130,"y":340,"wires":[]},{"id":"0fdd2d2283fd910b","type":"api-call-service","z":"6a4f25f2.3d2c5c","name":"Luz Quarto Prin On","server":"29f1ae58.924ea2","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.luzquartoprincipal","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":890,"y":180,"wires":[[]]},{"id":"04a0bd43dad4614b","type":"api-call-service","z":"6a4f25f2.3d2c5c","name":"FECHA OS ESTORES","server":"29f1ae58.924ea2","version":3,"debugenabled":false,"service_domain":"script","service":"turn_on","entityId":"script.fechaosestores","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":900,"y":340,"wires":[[]]},{"id":"596f23652a6d0d32","type":"api-call-service","z":"6a4f25f2.3d2c5c","name":"LUZES APAGAM","server":"29f1ae58.924ea2","version":3,"debugenabled":false,"service_domain":"script","service":"turn_on","entityId":"script.apagaasluzes","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":890,"y":380,"wires":[[]]},{"id":"583989dc95a306f9","type":"api-call-service","z":"6a4f25f2.3d2c5c","name":"Luz Quarto Prin Off","server":"29f1ae58.924ea2","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.luzquartoprincipal","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":890,"y":260,"wires":[[]]},{"id":"666b1cf9.686414","type":"server","name":"Home Assistant","version":1,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true},{"id":"29f1ae58.924ea2","type":"server","name":"Home Assistant","version":1,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]


Copyright © 2017-2021. Todos os direitos reservados
CPHA.pt - info@cpha.pt


FAQ | Termos de Serviço/Regras | Política de Privacidade