Is it possible to add a Rule with and action address for a device such as a smart plug? Or is this just possible with light groups and scenes
My goal is to switch on/off a smart plug based on a Smart Switch button event.
Is it possible to add a Rule with and action address for a device such as a smart plug? Or is this just possible with light groups and scenes
My goal is to switch on/off a smart plug based on a Smart Switch button event.
Okay I figured it out. The smart plug is exposed as a “light” resource:
Should you try to achieve a similar thing:
{
"actions": [
{
"address": "/lights/1/state",
"body": {
"on": true
},
"method": "PUT"
}
],
"conditions": [
{
"address": "/sensors/16/state/buttonevent",
"operator": "eq",
"value": "1002"
},
{
"address": "/sensors/16/state/lastupdated",
"operator": "dx"
},
{
"address": "/lights/1/state/on",
"operator": "eq",
"value": "false"
}
],
"name": "Plug On"
}