|  Developer
Updated on November 23, 2021

subscribe(script_name[, events_filter])

Subscribe a script for Zigbee events, optionally specifying event filter rules. After subscribing the script will be launched for each event happens on a Zigbee addon and information about this event will be passed as a parameter. 

Edit

  • params: script name (string), events_filter (table).
  • return: subscriber_id (string).
Edit
				
					    require "zigbee"

    zigbee.subscribe( "HUB:zigbee/scripts/events_handling" )