mirror of
https://github.com/lasthead0/yandex2mqtt.git
synced 2025-08-06 16:27:18 +03:00
Update README.md and config.js.orig
This commit is contained in:
34
README.md
34
README.md
@@ -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 */
|
||||
],
|
||||
```
|
||||
|
@@ -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 */
|
||||
],
|
||||
};
|
||||
|
Reference in New Issue
Block a user