I guess I'd need an external If then Else
Posted: 28 Nov 2016 07:16
The algorithm:
1. Trigger- Periodic time
2. Condition- Battery Level set to "lower than 0" just to get hold of the battery_temperature
3.Script-
global_temp_max= 36; // for test purposes ovetheat set to 36 degrees
global_temp={battery_temperature};
global_temp=global_temp / 10;
4.Speech
current temp is {global_temp};
Temperature threshold {global_temp_max};
5. What I'm trying to achieve:
Speech Output and Notification in the format:
Current temperature when below threshold;
Warning when global_temp >= global_temp_max
6. Where I'm stuck
Using conventional wisdom, IMHO, I'd need a Condition ( IF then Else type)
such as:
if (global_temp >= global_temp_max)
{ send warning speeech and notification about possible overheating
}
else
{
send only the current temperature without warning
}
7. Question:
Is there a way to insert in the flow a "box" where I run the If statement?
8. Observation
Since I'm giving my first steps wit AutoMagic, I fail to see how I
could create a "user condition box" in the flow
since the only possible ones are "Action and Condition"
using the pre-built options.
1. Trigger- Periodic time
2. Condition- Battery Level set to "lower than 0" just to get hold of the battery_temperature
3.Script-
global_temp_max= 36; // for test purposes ovetheat set to 36 degrees
global_temp={battery_temperature};
global_temp=global_temp / 10;
4.Speech
current temp is {global_temp};
Temperature threshold {global_temp_max};
5. What I'm trying to achieve:
Speech Output and Notification in the format:
Current temperature when below threshold;
Warning when global_temp >= global_temp_max
6. Where I'm stuck
Using conventional wisdom, IMHO, I'd need a Condition ( IF then Else type)
such as:
if (global_temp >= global_temp_max)
{ send warning speeech and notification about possible overheating
}
else
{
send only the current temperature without warning
}
7. Question:
Is there a way to insert in the flow a "box" where I run the If statement?
8. Observation
Since I'm giving my first steps wit AutoMagic, I fail to see how I
could create a "user condition box" in the flow
since the only possible ones are "Action and Condition"
using the pre-built options.