Yaml2node-red migation question

After many hours, I succeeded in automating zigbee devices in HA. A simple detection of movement is turning on a light via a sonoff zigbee mini.

alias: Switch Light
description: ‘’
trigger:

  • type: motion
    platform: device
    device_id: 34c829b90bd6894c13882f461f60de00
    entity_id: binary_sensor.ewelink_ms01_4dfe6a22_ias_zone
    domain: binary_sensor
    for:
    hours: 0
    minutes: 0
    seconds: 1
    milliseconds: 0
    id: binary_sensor.ewelink_ms01_4dfe6a22_ias_zone
    condition: []
    action:
  • type: toggle
    device_id: 26ec3cfe4441c97f205991397f38dddc
    entity_id: light.minizb01_on_off
    domain: light
    mode: single

Can this example be depicted in Node-red and if so, can someone share his json so I can import this and verify ? I’m also curious to find out how the device_id is derived in the example above, if I need that in Node red to make it work.

Use two device nodes in a row the first set to trigger and the second set to action.

Thanks for you help. My issue is/was finding the best/correct node to use for steering the Zigbee Mini switch.

I just picked 'call service node" and configured it. That did the job :upside_down_face: I think I’ve to get into the difference in nodes and different techniques that can be used to control HA devices.

[{"id":"434ba335.1c8b7c","type":"tab","label":"Zigbee","disabled":false,"info":""},{"id":"15af4d3889db3b8e","type":"debug","z":"434ba335.1c8b7c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":710,"y":240,"wires":[]},{"id":"5691de42c960c4e8","type":"debug","z":"434ba335.1c8b7c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":380,"y":240,"wires":[]},{"id":"20698df4494427dc","type":"server-state-changed","z":"434ba335.1c8b7c","name":"Detector ","server":"c85ce556.38fbc8","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.ms03_mot","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"eventData"}],"x":180,"y":340,"wires":[["5691de42c960c4e8","4da7edc8bbc9722b"]]},{"id":"4da7edc8bbc9722b","type":"api-call-service","z":"434ba335.1c8b7c","name":"Test","server":"c85ce556.38fbc8","version":3,"debugenabled":false,"service_domain":"light","service":"toggle","entityId":"light.sw01_on_off","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":510,"y":340,"wires":[["15af4d3889db3b8e"]]},{"id":"c85ce556.38fbc8","type":"server","name":"Home Assistant","version":1,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]