First pass with syscalls in the AST
This commit is contained in:
@@ -6,9 +6,9 @@ loop {
|
||||
let currentTemperature = loadFromDevice(roomTemperatureSensor, "Temperature");
|
||||
|
||||
if (currentTemperature > 25c) {
|
||||
setOnDevice(airConditioner, "On", true);
|
||||
setOnDevice(airConditioner, "Mode", "On");
|
||||
} else if (currentTemperature <= 20c) {
|
||||
setOnDevice(airConditioner, "On", false);
|
||||
setOnDevice(airConditioner, "Mode", "Off");
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user