diff --git a/plejd/DeviceRegistry.js b/plejd/DeviceRegistry.js index 2bfc63d..91efd55 100644 --- a/plejd/DeviceRegistry.js +++ b/plejd/DeviceRegistry.js @@ -49,13 +49,6 @@ class DeviceRegistry { /** @param outputDevice {import('types/DeviceRegistry').OutputDevice} */ addOutputDevice(outputDevice) { - if (outputDevice.hiddenFromIntegrations || outputDevice.hiddenFromRoomList) { - logger.verbose(`Device ${outputDevice.name} is hidden and will not be included. - Hidden from room list: ${outputDevice.hiddenFromRoomList} - Hidden from integrations: ${outputDevice.hiddenFromIntegrations}`); - return; - } - this.outputDevices = { ...this.outputDevices, [outputDevice.uniqueId]: outputDevice, diff --git a/plejd/PlejdApi.js b/plejd/PlejdApi.js index 3f4a00f..445bf88 100644 --- a/plejd/PlejdApi.js +++ b/plejd/PlejdApi.js @@ -444,8 +444,6 @@ class PlejdApi { bleOutputAddress, deviceId: device.deviceId, dimmable, - hiddenFromRoomList: device.hiddenFromRoomList, - hiddenFromIntegrations: device.hiddenFromIntegrations, name: device.title, output: deviceOutput, roomId: device.roomId, @@ -518,8 +516,6 @@ class PlejdApi { bleOutputAddress: roomAddress, deviceId: null, dimmable, - hiddenFromRoomList: false, - hiddenFromIntegrations: false, name: room.title, output: undefined, roomId: undefined, @@ -540,7 +536,7 @@ class PlejdApi { _getSceneDevices() { this.deviceRegistry.clearSceneDevices(); // add scenes as switches - const scenes = this.siteDetails.scenes.filter((x) => x.hiddenFromSceneList === false); + const scenes = [...this.siteDetails.scenes]; scenes.forEach((scene) => { const sceneNum = this.siteDetails.sceneIndex[scene.sceneId]; @@ -549,7 +545,6 @@ class PlejdApi { bleOutputAddress: sceneNum, deviceId: undefined, dimmable: false, - hiddenFromSceneList: scene.hiddenFromSceneList, name: scene.title, output: undefined, roomId: undefined, diff --git a/plejd/SceneManager.js b/plejd/SceneManager.js index 54dc256..cf66278 100644 --- a/plejd/SceneManager.js +++ b/plejd/SceneManager.js @@ -17,9 +17,7 @@ class SceneManager { } init() { - const scenes = this.deviceRegistry - .getApiSite() - .scenes.filter((x) => x.hiddenFromSceneList === false); + const scenes = [...this.deviceRegistry.getApiSite().scenes]; this.scenes = {}; scenes.forEach((scene) => { diff --git a/plejd/types/DeviceRegistry.d.ts b/plejd/types/DeviceRegistry.d.ts index 2d705cc..7a86661 100644 --- a/plejd/types/DeviceRegistry.d.ts +++ b/plejd/types/DeviceRegistry.d.ts @@ -7,9 +7,6 @@ export interface OutputDevice { deviceId: string; dim?: number; dimmable: boolean; - hiddenFromRoomList?: boolean; - hiddenFromIntegrations?: boolean; - hiddenFromSceneList?: boolean; name: string; output: number; roomId: string | undefined; diff --git a/plejd/types/Mqtt.d.ts b/plejd/types/Mqtt.d.ts index 3e3dc7a..d04aeda 100644 --- a/plejd/types/Mqtt.d.ts +++ b/plejd/types/Mqtt.d.ts @@ -5,21 +5,3 @@ 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; -}