Beiträge von pedermyrne

    I had the same problem, and I've made a few scripts on the theme of tampering with schedules and they are kind of a workaround:

    schedule_delete_all:

    Shelly.call("schedule.deleteall",null,null,null);

    Shelly.call("schedule.list",null,function(res,error_code,error_msg,ud){print(JSON.stringify(res));},null);

    schedule_create:

    let i = 1;

    while(i < 5){

    Shelly.call("schedule.create",{"enable":true,"timespec":"0 0 0 * * SUN,MON,TUE,WED,THU,FRI,SAT","calls":[

    {"method":"switch.set","params":{"id":0,"on":false}}

    ]},null,null);

    i++;

    }

    Shelly.call("schedule.list",null,function(res,error_code,error_msg,ud){print(JSON.stringify(res));},null);

    schedule_update:

    Shelly.call("schedule.update",{"id":1,"timespec":"0 0 5 * * SUN,MON,TUE,WED,THU,FRI,SAT","calls":[

    {"method":"switch.set","params":{"on":true,"id":0}}

    ]},null,null);

    Shelly.call("schedule.update",{"id":2,"enable":true,"timespec":"@sunrise * * SUN,MON,TUE,WED,THU,FRI,SAT","calls":[

    {"method":"switch.set","params":{"id":0,"on":false}}

    {"method":"schedule.update","params":{"id":1,"enable":false}}

    {"method":"schedule.update","params":{"id":3,"enable":true}}

    ]},null,null);

    Shelly.call("schedule.update",{"id":3,"timespec":"@sunset * * SUN,MON,TUE,WED,THU,FRI,SAT","calls":[

    {"method":"switch.set","params":{"on":true,"id":0}}

    ]},null,null);

    Shelly.call("schedule.update",{"id":4,"enable":true,"timespec":"0 0 23 * * SUN,MON,TUE,WED,THU,FRI,SAT","calls":[

    {"method":"switch.set","params":{"id":0,"on":false}}

    {"method":"schedule.update","params":{"id":1,"enable":true}}

    {"method":"schedule.update","params":{"id":3,"enable":false}}

    ]},null,null);

    Shelly.call("schedule.list",null,function(res,error_code,error_msg,ud){print(JSON.stringify(res));},null); //valfri