Update README.md and config.js.orig

This commit is contained in:
Eugene Abramov
2022-06-06 00:26:24 +03:00
parent 93c9d11b79
commit 56bfa2624e
2 changed files with 68 additions and 0 deletions

View File

@@ -281,6 +281,40 @@ devices: [
},
],
},
{
id: 'haw-001-motion',
name: 'Движение',
room: 'Коридор',
type: 'devices.types.sensor',
allowedUsers: ['2'],
mqtt: [
{
instance: 'motion',
state: '/yandex/sensors/HaW_001_Motion/motion',
},
],
valueMapping: [
{
type: 'event',
mapping: [['not_detected', 'detected'], ['false', 'true']], // [yandex, mqtt]
},
],
properties: [
{
type: 'devices.properties.event',
retrievable: true,
parameters: {
instance: 'motion',
events: [{
value: 'detected'
},
{
value: 'not_detected'
}]
},
},
],
},
/* --- end */
],
```

View File

@@ -156,6 +156,40 @@ module.exports = {
},
],
},
{
id: 'haw-001-motion',
name: 'Движение',
room: 'Коридор',
type: 'devices.types.sensor',
allowedUsers: ['2'],
mqtt: [
{
instance: 'motion',
state: '/yandex/sensors/HaW_001_Motion/motion',
},
],
valueMapping: [
{
type: 'event',
mapping: [['not_detected', 'detected'], ['false', 'true']], // [yandex, mqtt]
},
],
properties: [
{
type: 'devices.properties.event',
retrievable: true,
parameters: {
instance: 'motion',
events: [{
value: 'detected'
},
{
value: 'not_detected'
}]
},
},
],
},
/* --- end */
],
};