mirror of
https://github.com/lasthead0/yandex2mqtt.git
synced 2025-08-08 01:00:31 +03:00
Add toggle to initState
This commit is contained in:
@@ -59,6 +59,12 @@ class Device {
|
||||
value: false
|
||||
}
|
||||
}
|
||||
case 'toggle': {
|
||||
return {
|
||||
instance: parameters.instance,
|
||||
value: false
|
||||
}
|
||||
}
|
||||
case 'range': {
|
||||
return {
|
||||
instance: parameters.instance,
|
||||
@@ -117,7 +123,7 @@ class Device {
|
||||
const {id, name, description, room, type, capabilities, properties} = this.data;
|
||||
return {id, name, description, room, type, capabilities, properties};
|
||||
}
|
||||
|
||||
|
||||
/* Get only needed for response device info (bun not full device defenition) */
|
||||
getState () {
|
||||
const {id, capabilities, properties} = this.data;
|
||||
|
Reference in New Issue
Block a user