mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 15:26:59 +00:00
Attributes 'entity' and 'field' can both be used (#7078)
This commit is contained in:
parent
59e1a47ef4
commit
089d89798c
@ -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` %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user