Attributes 'entity' and 'field' can both be used (#7078)

This commit is contained in:
Leonardo Brondani Schenkel 2018-10-26 10:24:33 +02:00 committed by Fabian Affolter
parent 59e1a47ef4
commit 089d89798c

View File

@ -59,12 +59,14 @@ Set attribute of device in deCONZ using [Rest API](http://dresden-elektronik.git
| `entity` | No | String representing a specific Home Assistant entity of a device in deCONZ. | | `entity` | No | String representing a specific Home Assistant entity of a device in deCONZ. |
| `data` | No | Data is a JSON object with what data you want to alter. | | `data` | No | Data is a JSON object with what data you want to alter. |
Field and entity are exclusive, i.e you can only use one in a request. Either `entity` or `field` must be provided. If both are present, `field` will be interpreted as a subpath under the device path corresponding to the specified `entity`:
{ "field": "/lights/1", "data": {"name": "light2"} } { "field": "/lights/1", "data": {"name": "light2"} }
{ "entity": "light.light1", "data": {"name": "light2"} } { "entity": "light.light1", "data": {"name": "light2"} }
{ "entity": "light.light1", "field: "/state", "data": {"on": true} }
{ "field": "/config", "data": {"permitjoin": 60} } { "field": "/config", "data": {"permitjoin": 60} }
#### {% linkable_title Service `deconz.refresh_devices` %} #### {% linkable_title Service `deconz.refresh_devices` %}