SmartTapToRunAbility.getTapToRunRules(params?: TapToRunQueryParams)

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

Description

Query the list of Tap-to-Run actions that can be bound under the current home; invalid or automation rules will be filtered out.

Parameters

ParameterTypeRequiredDescription
NoQuery parameters

Return Value

Type: Promise<TapToRunRules>
List of bindable Tap-to-Run rules

Referenced Types

typeTapToRunRulesList of bindable Tap-to-Run rules
TapToRunRule[]
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 rules = await sdm.tapToRun.getTapToRunRules();
rules.forEach(rule => {
  console.log(rule.id, rule.name);
});