diff --git a/lib/platformAccessory.js b/lib/platformAccessory.js index d4a3fb4..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) || (name.UUID === service.UUID)) && service.subtype === subtype) + else if (typeof UUID === 'function' && ((service instanceof UUID) || (UUID.UUID === service.UUID)) && service.subtype === subtype) return service; } }