@@ -7,7 +7,7 @@ activate heating during the most cost-effective hours each day, employing variou
7
7
3. Utilization of min-max price levels to maintain the Shelly system consistently on or off.
8
8
The script executes daily after 23:00 to establish heating timeslots for the following day.
9
9
10
- created by Leivo Sepp, 16 .12.2024
10
+ created by Leivo Sepp, 17 .12.2024
11
11
https://github.com/LeivoSepp/Smart-heating-management-with-Shelly
12
12
*/
13
13
@@ -316,7 +316,7 @@ function storeSettingsKvs(userCongfigNotInKvs) {
316
316
let key = userCongfigNotInKvs . splice ( 0 , 1 ) [ 0 ] [ 0 ] + _ . sId ;
317
317
cntr ++ ;
318
318
Shelly . call ( "KVS.set" , { key : key , value : value } ,
319
- function ( _ , error_code , _ , data ) {
319
+ function ( res , error_code , error_message , data ) {
320
320
if ( error_code !== 0 ) {
321
321
print ( _ . pId , "Store settings" , data . key , data . value , "in KVS failed." ) ;
322
322
} else {
@@ -343,7 +343,7 @@ function deleteAllKvs(userConfig) {
343
343
let key = userConfig . splice ( 0 , 1 ) [ 0 ] ;
344
344
cntr ++ ;
345
345
Shelly . call ( "KVS.Delete" , { key : key } ,
346
- function ( _ , error_code , error_message , data ) {
346
+ function ( res , error_code , error_message , data ) {
347
347
if ( error_code === 0 ) {
348
348
print ( _ . pId , "Deleted " + data . key + " from KVS store" ) ;
349
349
} else {
@@ -390,7 +390,7 @@ function deleteVirtualComponents(vComponents) {
390
390
let key = vComponents . splice ( 0 , 1 ) [ 0 ] . key ;
391
391
cntr ++ ;
392
392
Shelly . call ( "Virtual.Delete" , { key : key } ,
393
- function ( _ , error_code , error_message , data ) {
393
+ function ( res , error_code , error_message , data ) {
394
394
if ( error_code === 0 ) {
395
395
print ( _ . pId , "Deleted " + data . key + " virtual component" ) ;
396
396
} else {
@@ -420,7 +420,7 @@ function addVirtualComponent(virtualComponents) {
420
420
let config = component . config ;
421
421
cntr ++ ;
422
422
Shelly . call ( "Virtual.Add" , { type : type , id : id , config : config } ,
423
- function ( _ , error_code , error_message , data ) {
423
+ function ( res , error_code , error_message , data ) {
424
424
if ( error_code === 0 ) {
425
425
print ( _ . pId , "Added virtual component: " + data . type + ":" + data . id ) ;
426
426
} else {
0 commit comments