Skip to content

Commit 41a1a06

Browse files
Kane610fabaff
authored andcommitted
deCONZ debug information (home-assistant#5026)
* Debug information * Minor changes
1 parent a1e51cc commit 41a1a06

File tree

1 file changed

+37
-19
lines changed

1 file changed

+37
-19
lines changed

source/_components/deconz.markdown

Lines changed: 37 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,7 @@ ha_iot_class: "Local Push"
1717

1818
[deCONZ REST API](http://dresden-elektronik.github.io/deconz-rest-doc/).
1919

20-
Home Assistant will automatically discover deCONZ presence on your network, if `discovery:` is present in your `configuration.yaml` file.
21-
22-
If you don't have the API key, you can generate an API key for deCONZ by using the one-click functionality similar to Philips Hue. Go to Menu->Settings->Unlock Gateway in deCONZ and then use the deCONZ configurator in Home Assistant GUI to create an API key. When you've generated the API key from Home Assistant, the API key will be stored in deconz.conf inside the home-assistant folder.
23-
24-
You can add the following to your configuration.yaml file if you are not using the `discovery:` component:
25-
26-
```yaml
27-
# Example configuration.yaml entry
28-
deconz:
29-
host: IP ADDRESS
30-
```
31-
32-
#### {% linkable_title Supported Device types %}
20+
### {% linkable_title Supported device types %}
3321

3422
- [Zigbee Lights](/components/light.deconz/)
3523
- [Humidity Sensors](/components/sensor.deconz/)
@@ -40,6 +28,20 @@ deconz:
4028
- [Switches (Remote Controls)](/components/sensor.deconz/)
4129
- [Temperature Sensors](/components/sensor.deconz/)
4230

31+
## {% linkable_title Configuration %}
32+
33+
Home Assistant will automatically discover deCONZ presence on your network, if `discovery:` is present in your `configuration.yaml` file.
34+
35+
If you don't have the API key, you can generate an API key for deCONZ by using the one-click functionality similar to Philips Hue. Go to **Menu** -> **Settings** -> **Unlock Gateway** in deCONZ and then use the deCONZ configurator in Home Assistant frontend to create an API key. When you've generated the API key from Home Assistant, the API key will be stored in `deconz.conf` inside the `.homeassistant` folder.
36+
37+
You can add the following to your configuration.yaml file if you are not using the `discovery:` component:
38+
39+
```yaml
40+
# Example configuration.yaml entry
41+
deconz:
42+
host: IP_ADDRESS
43+
```
44+
4345
{% configuration %}
4446
host:
4547
description: The IP address of your deCONZ web server.
@@ -66,10 +68,24 @@ deconz:
6668
port: 80
6769
```
6870
71+
## {% linkable_title Debugging component %}
72+
73+
If you have problems with deCONZ or the component you can add debug prints to the log.
74+
75+
```yaml
76+
logger:
77+
default: info
78+
logs:
79+
pydeconz: debug
80+
   homeassistant.components.deconz: debug
81+
```
82+
6983
## {% linkable_title Device services %}
84+
7085
Available services: `configure`.
7186

72-
#### {% linkable_title Service `deconz/configure` %}
87+
#### {% linkable_title Service `deconz.configure` %}
88+
7389
Set attribute of device in Deconz using [Rest API](http://dresden-elektronik.github.io/deconz-rest-doc/rest/).
7490

7591
| Service data attribute | Optional | Description |
@@ -86,7 +102,7 @@ Field and entity are exclusive, i.e you can only use one in a request.
86102

87103
{ "field": "/config", "data": {"permitjoin": 60} }
88104

89-
## {% linkable_title Remote control devices%}
105+
## {% linkable_title Remote control devices %}
90106

91107
Remote controls (ZHASwitch category) will be not be exposed as a regular entity, but as events named 'deconz_event' with a payload of 'id' and 'event'. Id will be the device name from deCONZ and Event will be the momentary state of the switch. However, a sensor entity will be created that shows the battery level of the switch as reported by deCONZ, named sensor.device_name_battery_level.
92108

@@ -107,6 +123,7 @@ For the IKEA Tradfri remote, 1 is the middle button, 2 is up, 3 is down, 4 is le
107123

108124
### {% linkable_title Step up and step down input number with wireless dimmer %}
109125

126+
{% raw %}
110127
```yaml
111128
automation:
112129
- alias: 'Toggle lamp from dimmer'
@@ -133,9 +150,9 @@ automation:
133150
- service: light.turn_on
134151
data_template:
135152
entity_id: light.lamp
136-
brightness: {% raw %}>
153+
brightness: >
137154
{% set bri = states.light.lamp.attributes.brightness | int %}
138-
{{ [bri+30, 249] | min }}{% endraw %}
155+
{{ [bri+30, 249] | min }}
139156
140157
- alias: 'Decrease brightness of lamp from dimmer'
141158
initial_state: 'on'
@@ -149,7 +166,8 @@ automation:
149166
- service: light.turn_on
150167
data_template:
151168
entity_id: light.lamp
152-
brightness: {% raw %}>
169+
brightness: >
153170
{% set bri = states.light.lamp.attributes.brightness | int %}
154-
{{ [bri-30, 0] | max }}{% endraw %}
171+
{{ [bri-30, 0] | max }}
155172
```
173+
{% endraw %}

0 commit comments

Comments
 (0)