Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Rule_conditions_noDepth
{
"name": "Rule with several conditions but no depth",
"actions": [
{
"if": {
"equals": {
"right": {
"device": {
"devices": [
"Dimmer1-ID"
],
"component": "main",
"capability": "switch",
"attribute": "switch"
}
},
"left": {
"string": "on"
}
}
}
},
{
"if": {
"equals": {
"right": {
"device": {
"devices": [
"Dimmer2-ID"
],
"component": "main",
"capability": "switch",
"attribute": "switch",
"trigger":"Never"
}
},
"left": {
"string": "off"
}
},
"then": [
{
"command": {
"devices": [
"Dimmer3-ID"
],
"commands": [
{
"component": "main",
"capability": "switch",
"command": "on"
}
]
}
}
]
}
},
{
"if": {
"equals": {
"right": {
"device": {
"devices": [
"Dimmer3-ID"
],
"component": "main",
"capability": "switchLevel",
"attribute": "level",
"trigger":"Never"
}
},
"left": {
"integer": 75
}
},
"then": [
{
"command": {
"devices": [
"Dimmer2-ID"
],
"commands": [
{
"component": "main",
"capability": "switch",
"command": "on"
}
]
}
}
]
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment