I want to control dimming of an Ikea Tradfri light using Rules API without affecting it’s on/off state.
I have some code I wrote but I’m getting “Malformed body on line 27” error.
{
"name": "Set brightness to 20%",
"actions": [
{
"every": {
"specific": {
"reference": "Sunset",
"offset": {
"value": {
"integer": 30
},
"unit": "Minute"
}
},
"actions": [
{
"command": {
"devices": [
"39199c4f-fe77-4ec4-ad5d-5ec62076edf8"
],
"commands": [
{
"component": "main",
"capability": "switchLevel",
"command": "setLevel",
"arguments": [
20
]
}
]
}
}
]
}
}
]
}
Appreciate any help.