Device SupportGroup Support

useSupport()

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

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
Check whether the device supports the specified function point
Check whether the device supports white-light brightness
Check whether the device supports color temperature
Check whether the device supports colored light
Check whether the device supports cloud-based scheduling
Check whether Matter white light is supported
Check whether the device has been added to a gateway
Check whether the current device is a group device
Check whether the device has the specified protocol capability (the input is a DeviceCapability enum value)
Check whether it is a Wi-Fi device
Determine whether it is a GPRS device
Determine whether it is a Bluetooth device
Determine whether it is a BLE Mesh device
Determine whether it is a Zigbee device
Determine whether it is a SIG Mesh device
Determine whether it is a Bluetooth‑type device (including Bluetooth / BLE Mesh / SIG Mesh)
Determine whether it is a Cat.1 device
Determine whether it is a Beacon device
Determine whether it is an LTE Cat.4 device
Determine whether it is an LTE Cat.10 device
Determine whether it is an LTE Cat.M device
Determine whether it is a Thread device
Determine whether it is a Matter device (including Tuya Matter and third‑party Matter)
Determine whether it is a Tuya Matter device (excluding third‑party Matter)
Check 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>
  );
}