This is an embedded Applescript I use in several triggers (when some Indigo variables change).
It simply takes variables values, processes, converts and re-writes them.
Would you please be so kind to translate it into Python script?
I'm not familiar with Python, but I intend to get my hands on it soon.
Thanks in advance!
- Code: Select all
set Hum to round ((value of variable "Suite_Hum") as integer) + 0
if Hum > 100 then
set value of variable "Suite_Hum" to 100
else
set value of variable "Suite_Hum" to Hum
end if
set lum to round ((value of variable "Suite_Lum") as integer)
set value of variable "Suite_Lum" to lum
set temp to round ((((value of variable "Suite_Temp") as integer) - 32) * 5 / 9) - 1
set value of variable "Suite_Temp" to temp