This application defines a smart lamp that changes the color in respect to the temperature and turn off the light when it is turned upside down
Compatibility
{ "do": [ { "timer": { "do": [ { "if": { "else": [ { "if": { "else": [ { "if": { "else": [ [ "tempC", "<=", 45 ], { "light": { "color": 12, "duration": 1 } } ], "is": [ "tempC", "<=", 40 ], "then": [ { "light": { "color": 11, "duration": 1 } } ] } } ], "is": [ "tempC", "<=", 20 ], "then": [ { "light": { "color": 2, "duration": 1 } } ] } } ], "is": [ "tempC", "a", 10 ], "then": [ { "light": { "color": 8, "duration": 1 } } ] } } ], "every": 1, "id": 0, "play": -1 } } ]}