Thanks to Tomasz Brzozowski @ Facebook:
Shelly.call is an asynchronous function. Use Shelly.getComponentStatus - synchronous call.
This works now:
inputstate = Shelly.getComponentStatus("input:0").state
Thanks to Tomasz Brzozowski @ Facebook:
Shelly.call is an asynchronous function. Use Shelly.getComponentStatus - synchronous call.
This works now:
inputstate = Shelly.getComponentStatus("input:0").state
Mit 1.2.0-beta2 funktioniert es. ![]()
How can I read the input state at startup of the Shelly script?
let resultx = null;
Shelly.call("Input.GetStatus", {id:0},
function(result) {
print("Status:", result.state); resultx = result;
}
);
print("out: ", resultx);
Log:
out: null
Status: true
The print "out" is executed before the print "status".
How can I get the status of the input after calling Shelly.call("Input.GetStatus"...
BR, Harald
Liebe Shelly Freunde,
ich habe mit der Shelly Mini1G3 folgendes Problem mit Alexa:
Mit einer Shelly Plus1Mini tritt dieser Fehler nicht auf.
Hat vielleicht jemand eine Idee dazu?
Liebe Grüße
Harald