Last active
September 29, 2015 19:41
-
-
Save dpjanes/ce3624b34e41499d5a77 to your computer and use it in GitHub Desktop.
Netflix & Chill #2 - with IoTQL and Views
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- CREATE VIEW not implemented yet | |
CREATE VIEW | |
LivingRoom | |
WHERE | |
meta:zone & "Living Room"; | |
CREATE ACTION | |
NetflixChill | |
BEGIN | |
UPDATE | |
LivingRoom | |
SET | |
state:on = true, | |
state:band = iot-attribute:band.service.netflix | |
WHERE | |
meta:facet & iot-facet:media.tv; | |
UPDATE | |
LivingRoom | |
SET | |
state:on = false | |
WHERE | |
meta:facet & iot-facet:lighting; | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment