mirror of
https://github.com/lasthead0/yandex2mqtt.git
synced 2025-08-08 01:00:31 +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 */
|
/* Find property by type (and instance) */
|
||||||
// findProperty(type) {
|
findProperty(type, instance) {
|
||||||
// return this.data.properties.find(p => p.type === type);
|
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*/
|
/* Find 'set' topic by instance*/
|
||||||
findTopicByInstance(instance) {
|
findTopicByInstance(instance) {
|
||||||
|
Reference in New Issue
Block a user