From 1fce5c875439a9a61a9f1ff4f7c483aedba440e0 Mon Sep 17 00:00:00 2001 From: Jon Maddox Date: Thu, 1 Oct 2015 01:29:42 -0400 Subject: [PATCH 1/2] ignore hiddent Home Assistant devices --- platforms/HomeAssistant.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/platforms/HomeAssistant.js b/platforms/HomeAssistant.js index 5a23ab5..61d3bc2 100644 --- a/platforms/HomeAssistant.js +++ b/platforms/HomeAssistant.js @@ -152,15 +152,24 @@ HomeAssistantPlatform.prototype = { entity = data[i] entity_type = entity.entity_id.split('.')[0] + // ignore devices that are not in the list of supported types if (that.supportedTypes.indexOf(entity_type) == -1) { continue; } + // ignore hidden devices + if (entity.attributes && entity.attributes.hidden) { + continue; + } + var accessory = null if (entity_type == 'light') { accessory = new HomeAssistantLight(that.log, entity, that) }else if (entity_type == 'switch'){ + console.log(JSON.stringify(entity)) + console.log(""); + console.log(""); accessory = new HomeAssistantSwitch(that.log, entity, that) }else if (entity_type == 'scene'){ accessory = new HomeAssistantSwitch(that.log, entity, that, 'scene') From 45f40874efd315c0aa7ecb145c521f3a6ac5ef92 Mon Sep 17 00:00:00 2001 From: Mikulas Date: Thu, 1 Oct 2015 23:22:17 +0200 Subject: [PATCH 2/2] add lifx to sample config --- config-sample.json | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/config-sample.json b/config-sample.json index 6f24554..7af74db 100644 --- a/config-sample.json +++ b/config-sample.json @@ -89,14 +89,19 @@ "delay": 30, "repeat": 3, "zones":["Kitchen Lamp","Bedroom Lamp","Living Room Lamp","Hallway Lamp"] - }, - { + }, + { "platform": "HomeAssistant", "name": "HomeAssistant", "host": "http://192.168.1.10:8123", "password": "XXXXX", "supported_types": ["light", "switch", "media_player", "scene"] - } + }, + { + "platform": "LIFx", + "name": "LIFx", + "access_token": "XXXXXXXX generate at https://cloud.lifx.com/settings" + } ], "accessories": [