UNPKG

lavva.exalushome

Version:

Library implementing communication and abstraction layers for ExalusHome system

84 lines (83 loc) 3.52 kB
import { ITypedEvent } from "../../TypedEvent"; import { FieldChangeResult } from "../FieldChangeResult"; import { IDeviceTaskTypeInfo, IDeviceResponseTypeInfo, IDevice } from './IDevice'; import { ChannelConfigurations, IDeviceChannel, Roles, TaskExecution } from './IDeviceChannel'; import { IDeviceState, IDeviceStateData } from "./IDeviceState"; import { IDeviceTask } from "./IDeviceTask"; import { DeviceTaskExecutionResult } from "./TaskExecutionResult"; export declare class DeviceChannel implements IDeviceChannel { private _device; private _number; private _name; private _iconName; private _channelId; private _mode; private _channelGroups; private _isHidden; private _availableTasksTypes; private _availableResponseTypes; private static _devicesService; private _customData; private _roles; private _configurations; CustomDataAndRolesSupported: boolean; private _onTasksExecutionChangedEvent; private _onChannelStateChangedEvent; private _onChannelStateRefreshedOrChangedEvent; constructor(); OnChannelStateChangedEvent(): ITypedEvent<IDeviceState<IDeviceStateData>>; OnChannelStateRefreshedOrChangedEvent(): ITypedEvent<IDeviceState<IDeviceStateData>>; get Configurations(): Record<string, string>; set Configurations(value: Record<string, string>); IsCustomDataAndRolesSupported(): boolean; get CustomData(): Record<string, string>; set CustomData(value: Record<string, string>); get Roles(): Roles[]; set Roles(value: Roles[]); get ChannelId(): string; SetDevice(device: IDevice): void; GetDevice(): IDevice; SetCustomDataAsync(dataId: string, data: string): Promise<FieldChangeResult>; RemoveCustomDataAsync(dataId: string): Promise<FieldChangeResult>; GetChannelConfigurationData(): ChannelConfigurationData; HideAsync(): Promise<FieldChangeResult>; ShowAsync(): Promise<FieldChangeResult>; ChangeNameAsync(name: string): Promise<FieldChangeResult>; ChangeIconNameAsync(name: string): Promise<FieldChangeResult>; ChangeGroupsAsync(groups: string[]): Promise<FieldChangeResult>; ChangeConfigurationAsync(configuration: DeviceChannelConfiguration): Promise<FieldChangeResult>; get Number(): number; set Number(value: number); get Name(): string; set Name(value: string); get IconName(): string; set IconName(value: string); get States(): IDeviceState<IDeviceStateData>[]; get Mode(): ChannelConfigurations; set Mode(value: ChannelConfigurations); get ChannelGroups(): string[]; set ChannelGroups(value: string[]); get IsHidden(): boolean; set IsHidden(value: boolean); get AvailableTaskTypes(): IDeviceTaskTypeInfo[]; set AvailableTaskTypes(value: IDeviceTaskTypeInfo[]); get AvailableResponseTypes(): IDeviceResponseTypeInfo[]; set AvailableResponseTypes(value: IDeviceResponseTypeInfo[]); OnTasksExecutionChangeEvent(): ITypedEvent<TaskExecution>; ExecuteTaskAsync(task: IDeviceTask): Promise<DeviceTaskExecutionResult>; } export declare class DeviceChannelConfiguration { DeviceGuid: string; ChannelConfiguration: ChannelConfigurationData; } export declare class ChannelConfigurationData { Channel: number; ChannelName: string; Configuration: ChannelConfigurations; GroupsGuids: string[]; IconName: string; Hidden: boolean; Configurations: Record<string, string>; CustomData: Record<string, string>; Roles: Roles[]; }