Skip to content

Instantly share code, notes, and snippets.

@BenediktNiehues
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BenediktNiehues/395cfbb7073fd0c29e6b to your computer and use it in GitHub Desktop.
Save BenediktNiehues/395cfbb7073fd0c29e6b to your computer and use it in GitHub Desktop.
Rule Description
{
"id" : "motion1",
"label" : "Motion-based lamp switch",
"tags" : ["motion", "light"],
"description" : "Switches a lamp on motion detection.",
"active": true,
"on": [
{
"type": "ItemUpdateEvent",
"config": {
"itemName": "Livingroom_Motion"
}
},
{
"type": "ItemUpdateEvent",
"config": {
"itemName": "Livingroom_Brightness"
}
}
],
"if": [
{
"type": "Compare",
"config": {
"operator": "<",
"left:": "items.Livingroom_Brightness",
"right": "30"
}
}
],
"then": [
{
"type": "SendCommand",
"config": {
"itemName": "DinnerTable_Light",
"command": "ON"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment