mirror of
https://github.com/lasthead0/yandex2mqtt.git
synced 2025-08-07 16:50:30 +03:00
Add allowed users support
This commit is contained in:
13
device.js
13
device.js
@@ -113,10 +113,15 @@ class Device {
|
||||
}
|
||||
}
|
||||
|
||||
/* Unused for now */
|
||||
// findProperty(type) {
|
||||
// return this.data.properties.find(p => p.type === type);
|
||||
// }
|
||||
/* Find property by type (and instance) */
|
||||
findProperty(type, instance) {
|
||||
const {properties} = this.data;
|
||||
if (instance != undefined) {
|
||||
return properties.find(p => p.type === type && p.state.instance === instance);
|
||||
} else {
|
||||
return properties.find(p => p.type === type);
|
||||
}
|
||||
}
|
||||
|
||||
/* Find 'set' topic by instance*/
|
||||
findTopicByInstance(instance) {
|
||||
|
Reference in New Issue
Block a user