SmartTapToRunAbility.getBindTapToRunRules(params?: TapToRunQueryParams)

Requires:
@ray-js/panel-sdk≥1.11.0

Description

Query the list of automations bound to Tap-to-Run

Parameters

ParameterTypeRequiredDescription
NoQuery parameters

Return Value

Type: Promise<BindTapToRunRules>
List of bound Tap-to-Run rules

Referenced Types

typeBindTapToRunRulesList of bound Tap-to-Run automation rules
export type BindTapToRunRules = BindTapToRunRule[];
typeBindTapToRunRuleBound Tap-to-Run item
PropertyTypeDescription
associativeEntityIdstringAssociated entity ID, in the format dpId#dpValue
List of values for the associated entity
bindIdnumberBind ID
bizDomainstringBusiness domain; for Tap-to-Run this is fixed as wirelessSwitchBindScene
enablebooleanWhether enabled
sourceEntityIdstringSource device ID
typeBindTapToRunLinkedRuleBound Tap-to-Run target rule
PropertyTypeDescription
ruleTypenumberRule type
triggerRuleEnablebooleanWhether the rule is enabled
triggerRuleIdstringExecution rule ID, typically used for triggering
typeTapToRunRuleBindable one-tap execution rules
PropertyTypeDescription
Action list
backgroundstringBackground image URL
boundForPanelbooleanPanel binding
boundForWiFiPanelbooleanWiFi panel binding
coverIconstringIcon
displayColorstringBackground color
enabledbooleanWhether the rule is enabled
idstringExecution rule ID
namestringAutomation name or note
typeTapToRunActionOne-tap action item
PropertyTypeDescription
actionDisplaystringAction display name
actionExecutorstringAction executor
actionStrategystringAction execution policy
entityIdstringOwning entity ID
gmtModifiednumberLast modified timestamp
idstringUnique action ID
orderNumnumberAction sequence number
ruleIdstringRule ID
statusbooleanAction status

Examples

Example

const bindRules = await sdm.tapToRun.getBindTapToRunRules();
bindRules.forEach(item => {
  console.log('Bound ID:', item.bindId);
  item.associativeEntityValueList.forEach(rule => {
    console.log('Bound rule:', rule.id, rule.name);
  });
});