File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ const utils = require('@iobroker/adapter-core');
77
88const MinPollInterval = 1000 ;
99const MaxPollInterval = 60000 ;
10- const CheckDeviceTimeoutMs = 1000 ;
10+ const CheckDevicesTimeoutMs = 1000 ;
11+ const CheckDevicesTimeout = 'CheckDevices' ;
1112
1213class GreeHvac extends utils . Adapter {
1314
@@ -115,16 +116,16 @@ class GreeHvac extends utils.Adapter {
115116 }
116117
117118 checkDevices ( ) {
118- this . timeouts [ 'CheckDevice' ] = this . setTimeout ( async ( ) => {
119+ this . timeouts [ CheckDevicesTimeout ] = this . setTimeout ( async ( ) => {
119120 const inactiveDevices = this . activeDevices . filter ( device => device . isActive === false ) ;
120121 if ( inactiveDevices . length > 0 ) {
121122 await this . setStateAsync ( 'info.connection' , { val : false , ack : true } ) ;
122123 } else {
123124 await this . setStateAsync ( 'info.connection' , { val : true , ack : true } ) ;
124125 }
125- this . clearTimeout ( this . timeouts [ 'CheckDevice' ] ) ;
126+ this . clearTimeout ( this . timeouts [ CheckDevicesTimeout ] ) ;
126127 this . checkDevices ( ) ;
127- } , CheckDeviceTimeoutMs ) ;
128+ } , CheckDevicesTimeoutMs ) ;
128129 }
129130
130131 /**
You can’t perform that action at this time.
0 commit comments