From 7f753f79f69f38fa84a9b1f1c4a43bfe3b022792 Mon Sep 17 00:00:00 2001 From: Jon Maddox Date: Wed, 16 Sep 2015 03:14:09 -0400 Subject: [PATCH] HA switch takes a type argument This lets you pass the domain to the switch to let it be other types of objects, like say, a scene. --- platforms/HomeAssistant.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platforms/HomeAssistant.js b/platforms/HomeAssistant.js index 4c12a40..3929b3e 100644 --- a/platforms/HomeAssistant.js +++ b/platforms/HomeAssistant.js @@ -399,9 +399,9 @@ HomeAssistantMediaPlayer.prototype = { } -function HomeAssistantSwitch(log, data, client) { +function HomeAssistantSwitch(log, data, client, type) { // device info - this.domain = "switch" + this.domain = type || "switch" this.data = data this.entity_id = data.entity_id if (data.attributes && data.attributes.friendly_name) {