From 727809e9b4ff188cf8325a0ae18990fe2234f676 Mon Sep 17 00:00:00 2001
From: Thomas Kluge
Date: Fri, 30 Oct 2015 18:30:07 +0100
Subject: [PATCH] removed some logs changed to autodetection if hm channel is
supported yet
---
platforms/HomeMatic.js | 9 +++++----
platforms/HomematicChannel.js | 4 +---
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/platforms/HomeMatic.js b/platforms/HomeMatic.js
index 219ebdf..30244e5 100644
--- a/platforms/HomeMatic.js
+++ b/platforms/HomeMatic.js
@@ -308,14 +308,15 @@ HomeMaticPlatform.prototype = {
// that.log('name', ch.name, ' -> address:', ch.address);
if ((ch.address !== undefined) && (!isChannelFiltered)) {
- if ((ch.type == "SWITCH") || (ch.type == "BLIND") || (ch.type == "SHUTTER_CONTACT") || (ch.type == "DIMMER") || (ch.type == "CLIMATECONTROL_RT_TRANSCEIVER") || (ch.type == "MOTION_DETECTOR") || (ch.type == "KEYMATIC")) {
+
// Switch found
// Check if marked as Outlet
var special = (that.outlets.indexOf(ch.address) > -1) ? "OUTLET" : undefined;
var accessory = new HomeMaticGenericChannel(that.log, that, ch.id, ch.name, ch.type, ch.address, special);
- that.foundAccessories.push(accessory);
- }
-
+ if (accessory.sType()!=undefined) {
+ // support exists for this channel
+ that.foundAccessories.push(accessory);
+ }
} else {
that.log(device.name + " has no address");
diff --git a/platforms/HomematicChannel.js b/platforms/HomematicChannel.js
index e2818a5..2322fed 100644
--- a/platforms/HomematicChannel.js
+++ b/platforms/HomematicChannel.js
@@ -78,9 +78,7 @@ HomeMaticGenericChannel.prototype = {
// Check custom Mapping from HM to HomeKit
var map = this.datapointMappings[dp];
if (map != undefined) {
- this.log("Mapping found for " + dp);
if (map[value]!=undefined) {
- this.log("Mapping found for " + dp + " " + value);
value = map[value];
}
}
@@ -636,7 +634,7 @@ HomeMaticGenericChannel.prototype = {
return types.THERMOSTAT_STYPE;
}
- if ((this.type=="SHUTTER_CONTACT") ||(this.type=="ROTARY_HANDLE_SENSOR")) {
+ if ((this.type=="SHUTTER_CONTACT") || (this.type=="ROTARY_HANDLE_SENSOR")) {
return types.CONTACT_SENSOR_STYPE;
}