Device SupportGroup Support

useSupport

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

Method signature
useSupport()

Description

Get a device capability detection instance to determine the features and protocols the device supports

Parameters

None

Return Value

Type: SupportAbilityMethods
SmartSupportAbility instance object

Referenced Types

interfaceSupportAbilityMethods
PropertyTypeDescription
isSupportDp(dpCode: string, isForce: boolean) => booleanCheck whether the device supports the specified function point
isSupportBright(isForce: boolean) => booleanCheck whether the device supports white-light brightness
isSupportTemp(isForce: boolean) => booleanCheck whether the device supports color temperature
isSupportColour(isForce: boolean) => booleanCheck whether the device supports colored light
isSupportCloudTimer() => booleanCheck whether the device supports cloud-based scheduling
isSupportMatterWhite(force: boolean) => booleanCheck whether Matter white light is supported
isInGateway() => booleanCheck whether the device has been added to a gateway
isGroupDevice() => booleanCheck whether the current device is a group device
hasCapability(id: number) => booleanCheck whether the device has the specified protocol capability (the input is a DeviceCapability enum value)
isWifiDevice() => booleanCheck whether it is a Wi-Fi device
isGprsDevice() => booleanDetermine whether it is a GPRS device
isBluetoothDevice() => booleanDetermine whether it is a Bluetooth device
isBleMeshDevice() => booleanDetermine whether it is a BLE Mesh device
isZigbeeDevice() => booleanDetermine whether it is a Zigbee device
isSigMeshDevice() => booleanDetermine whether it is a SIG Mesh device
isBleDevice() => booleanDetermine whether it is a Bluetooth‑type device (including Bluetooth / BLE Mesh / SIG Mesh)
isCat1Device() => booleanDetermine whether it is a Cat.1 device
isBeaconDevice() => booleanDetermine whether it is a Beacon device
isLteCat4Device() => booleanDetermine whether it is an LTE Cat.4 device
isLteCat10Device() => booleanDetermine whether it is an LTE Cat.10 device
isLteCatMDevice() => booleanDetermine whether it is an LTE Cat.M device
isThreadDevice() => booleanDetermine whether it is a Thread device
isMatterDevice() => booleanDetermine whether it is a Matter device (including Tuya Matter and third‑party Matter)
isTuyaMatterDevice() => booleanDetermine whether it is a Tuya Matter device (excluding third‑party Matter)
isTripartiteMatter() => booleanCheck whether it is a third-party Matter device

Examples

Example

import { useSupport } from '@ray-js/panel-sdk';

function SupportPage() {
  const support = useSupport();
  return (
    <View>
      <Text>{support.isSupportCloudTimer() ? 'Supports cloud timer' : 'Does not support cloud timer'}</Text>
      <Text>{support.isSupportDp('switch_led') ? 'Switch available' : 'Switch unavailable'}</Text>
    </View>
  );
}