From c93b0b0df10596161f39fa39836c1ed6aaaf227d Mon Sep 17 00:00:00 2001 From: Raoul Date: Mon, 8 Feb 2016 22:18:54 +0100 Subject: [PATCH 1/2] Update platformAccessory.js Small type, big result. --- lib/platformAccessory.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/platformAccessory.js b/lib/platformAccessory.js index d4a3fb4..e81933a 100644 --- a/lib/platformAccessory.js +++ b/lib/platformAccessory.js @@ -90,7 +90,7 @@ PlatformAccessory.prototype.getServiceByUUIDAndSubType = function(UUID, subtype) if (typeof UUID === 'string' && (service.displayName === UUID || service.name === UUID) && service.subtype === subtype ) return service; - else if (typeof name === 'function' && ((service instanceof name) || (name.UUID === service.UUID)) && service.subtype === subtype) + else if (typeof name === 'function' && ((service instanceof name) || (UUID.UUID === service.UUID)) && service.subtype === subtype) return service; } } From 7dd8e12791f360ddddc348e576151409605aa65a Mon Sep 17 00:00:00 2001 From: Raoul Date: Mon, 8 Feb 2016 23:06:32 +0100 Subject: [PATCH 2/2] Update platformAccessory.js Some more copy-and-paste errors in the same line. Was wondering why my platform was failing, but never looked to that simple lines of code :-( --- lib/platformAccessory.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/platformAccessory.js b/lib/platformAccessory.js index e81933a..1079738 100644 --- a/lib/platformAccessory.js +++ b/lib/platformAccessory.js @@ -90,7 +90,7 @@ PlatformAccessory.prototype.getServiceByUUIDAndSubType = function(UUID, subtype) if (typeof UUID === 'string' && (service.displayName === UUID || service.name === UUID) && service.subtype === subtype ) return service; - else if (typeof name === 'function' && ((service instanceof name) || (UUID.UUID === service.UUID)) && service.subtype === subtype) + else if (typeof UUID === 'function' && ((service instanceof UUID) || (UUID.UUID === service.UUID)) && service.subtype === subtype) return service; } }