Closed ebaauw closed 7 years ago
When doing a PUT to an existing rule, updating only the actions
, the action.body
attributes get updated alright.
I've the same issue and I'm still on .79
PUT works also when updating conditions and actions in the same request.
Creating rules with POST works if you specify action.body
as a string (serialized JSON) instead of a JSON object, e.g. body: "{\"on\": true}"
instead of body: {"on": true}
.
It is a workaround and this should be fixed.
Thanks, @snozzlebert, that's insightful. Found the bug and fixed it. Waiting for PR #225...
When creating rules under v2.04.81 (with the latest commits),
action.body
seems to be ignored and remains empty. It isn't stored to the database either. It seems to happen to all rules, irrespective to the type of action (group, sensor, light).It's been a while since I last updated my rules, so I'm not sure if this is issue is introduced by v2.04.81 or by an earlier change. Existing rules had been working without any issues. When I patch the database, adding the body, the rule works as expected.
For example see the following transcript:
As you can see from the deCONZ log, the body is received by deCONZ, but not returned:
Attached the full log. deCONZ.log