useOriginMatterTemp()

Requires:
≥1.15.0

Description

Get the raw Matter color temperature color_temp_control (Kelvin) to avoid precision loss when converting with the standard temp_value, for UI display.

Parameters

None

Return Value

Type: any
Current color_temp_control; 0 for non-Matter devices

Examples

Example

import React from 'react';
import { View } from '@ray-js/ray';
import { createMatterKit } from '@ray-js/panel-sdk';

const matterKit = createMatterKit();

export default function TempDisplay() {
  const originTemp = matterKit.hooks.useOriginMatterTemp();
  return <View>Original color temperature: {originTemp}</View>;
}