Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
fr:liste_script [2015/12/23 18:39] eric64 |
fr:liste_script [2016/01/13 20:28] 127.0.0.1 external edit |
||
---|---|---|---|
Line 197: | Line 197: | ||
//By eric64// | //By eric64// | ||
- | **But :** Script permettant de donner une valeur True ou False à une variable lors de l' | + | **But :** Script permettant de donner une valeur True ou False à une variable lors de l' |
< | < | ||
- | -- Title: Set RGB light output depending on Temperature | ||
- | -- | ||
- | -- Description : | ||
- | -- Set white color if temp is < 10°C | ||
- | -- Set light blue color if temps is between 10 and 15 | ||
- | -- Set dark blue color if temp is between 15 and 19 | ||
- | -- Set green color if temp is between 19 and 22 | ||
- | -- Set Yellow color ir temp is between 22 and 25 | ||
- | -- Set Orange color if temp is between 25 and 28 | ||
- | -- Set Red color if temp is greater than 28 | ||
- | -- | ||
- | -- Inputs | ||
- | -- * input_4 : N° entrée Temperature | ||
- | -- Output | ||
- | -- * output_6 : N° Sortie RGB light | ||
- | -- Events | ||
- | -- This script may be launched on input_4 changes | ||
- | |||
- | local temp = calaos: | ||
- | if temp < 10.0 then | ||
- | --blanc | ||
- | str = "set 0x60FFFF" | ||
- | elseif temp >= 10.0 and temp < 15.0 then | ||
- | --bleu clair | ||
- | str = "set 0x28FFFF" | ||
- | elseif temp >= 15.0 and temp < 19.0 then | ||
- | --bleu foncé | ||
- | str = "set 0x0060FF" | ||
- | elseif temp >= 19.0 and temp < 22.0 then | ||
- | -- vert | ||
- | str = "set 0x28FF28" | ||
- | elseif temp >= 22.0 and temp < 25.0 then | ||
- | -- Jaune | ||
- | str = "set 0x7AFF00" | ||
- | elseif temp >= 25.0 and temp < 28.0 then | ||
- | -- Orange | ||
- | str = "set 0xFFFF00" | ||
- | elseif temp > 28.0 then | ||
- | -- Rouge | ||
- | str = "set 0xFF3D00" | ||
- | end | ||
- | calaos: | ||
- | return true | ||
- | |||
- | ****** | ||
local Variable_Activation_Inter = calaos: | local Variable_Activation_Inter = calaos: | ||