Set entiteis to correct type (switch/light) and fix availability for scenes

- General cleanup and clarification of MQTT messages
This commit is contained in:
Victor Hagelbäck 2021-05-03 09:45:57 +02:00
parent 36e5c62b4f
commit 236e533c8a
3 changed files with 122 additions and 63 deletions

25
plejd/types/Mqtt.d.ts vendored Normal file
View file

@ -0,0 +1,25 @@
/* eslint-disable no-use-before-define */
export type TopicType = 'config' | 'state' | 'availability' | 'set';
export type TOPIC_TYPES = { [key: string]: TopicType };
export type MqttType = 'light' | 'scene' | 'switch' | 'device_automation';
export type MQTT_TYPES = { [key: string]: MqttType };
export interface OutputDevice {
bleOutputAddress: number;
deviceId: string;
dim?: number;
dimmable: boolean;
hiddenFromRoomList?: boolean;
hiddenFromIntegrations?: boolean;
hiddenFromSceneList?: boolean;
name: string;
output: number;
roomId: string;
state: boolean | undefined;
type: string;
typeName: string;
version: string;
uniqueId: string;
}