Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

device_support(Heiman): add HS8OS #7423

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Merge branch 'master' into heiman-occupancy
  • Loading branch information
mrskycriper authored Jul 5, 2024
commit 84b20d0fc5b81a3a6e7b2ae6cc27df04e65898d4
1 change: 0 additions & 1 deletion src/devices/heiman.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
const ea = exposes.access;
import * as tuya from '../lib/tuya';
import {light, battery, iasZoneAlarm, illuminance, occupancy, identify, ota, numeric} from '../lib/modernExtend';
import {Zcl} from 'zigbee-herdsman';

const definitions: Definition[] = [
{
Expand Down Expand Up @@ -790,14 +789,14 @@
numeric({
name: 'illuminance_threshold',
cluster: 'msIlluminanceMeasurement',
attribute: {ID: 0xF000, type: Zcl.DataType.INT16},

Check failure on line 792 in src/devices/heiman.ts

View workflow job for this annotation

GitHub Actions / ci

Cannot find name 'Zcl'.
description: 'Controls illuminance threshold for sending commands',
valueMin: 0,
valueMax: 1000,
unit: 'lx',
entityCategory: 'config',
read: true,
zigbeeCommandOptions: {manufacturerCode: Zcl.ManufacturerCode.HEIMAN_TECHNOLOGY_CO_LTD},

Check failure on line 799 in src/devices/heiman.ts

View workflow job for this annotation

GitHub Actions / ci

Cannot find name 'Zcl'.
}),
// radar settings (?)
// diagnostics
Expand Down
22 changes: 17 additions & 5 deletions src/lib/modernExtend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1790,11 +1790,23 @@ export function enumLookup(args: EnumLookupArgs): ModernExtend {
export type ScaleFunction = (value: number, type: 'from' | 'to') => number;

export interface NumericArgs {
name: string, cluster: string | number, attribute: string | {ID: number, type: number}, description: string,
zigbeeCommandOptions?: {manufacturerCode?: number, disableDefaultResponse?: boolean}, access?: 'STATE' | 'STATE_GET' | 'ALL', unit?: string,
endpointNames?: string[], reporting?: ReportingConfigWithoutAttribute,
valueMin?: number, valueMax?: number, valueStep?: number, scale?: number | ScaleFunction, label?: string,
entityCategory?: 'config' | 'diagnostic', precision?: number, read?: boolean
name: string;
cluster: string | number;
attribute: string | {ID: number; type: number};
description: string;
zigbeeCommandOptions?: {manufacturerCode?: number; disableDefaultResponse?: boolean};
access?: 'STATE' | 'STATE_GET' | 'ALL';
unit?: string;
endpointNames?: string[];
reporting?: ReportingConfigWithoutAttribute;
valueMin?: number;
valueMax?: number;
valueStep?: number;
scale?: number | ScaleFunction;
label?: string;
entityCategory?: 'config' | 'diagnostic';
precision?: number;
read?: boolean;
}
export function numeric(args: NumericArgs): ModernExtend {
const {
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.