You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guide/configuration/devices-groups.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ sure to set `mqtt.version` to `5` (see `mqtt` configuration above)
78
78
QoS level for MQTT messages of this device. [What is QoS?](https://www.npmjs.com/package/mqtt#about-qos)
79
79
80
80
**`homeassistant`**
81
-
Allows overriding the values of the Home Assistant discovery payload. See example above.
81
+
Allows overriding the values of the Home Assistant discovery payload. Overrides can be set globally for the device or for a specific discovered entity under its `object_id`; setting a property to `null` removes it from the discovery payload. See [Home Assistant discovery overrides](../usage/integrations/home_assistant.md#overriding-discovery-properties) for examples.
82
82
83
83
**`debounce`**
84
84
Debounces messages of this device. When setting e.g. `debounce: 1` and a message from a device is
Copy file name to clipboardExpand all lines: docs/guide/usage/integrations/home_assistant.md
+49Lines changed: 49 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -117,6 +117,11 @@ Group discovery properties can be overridden via `groups.<id>.homeassistant` in
117
117
118
118
Any Home Assistant MQTT discovery property can be overridden on a device. Two examples are shown below. For a full and current list of discovery properties, see [the Home Assistant MQTT Discovery integration](https://www.home-assistant.io/integrations/mqtt/#mqtt-discovery) and [the Home Assistant extension](https://github.com/Koenkk/zigbee2mqtt/blob/03ba647dc6b5f299f8f3ab441712999fcb3a253e/lib/extension/homeassistant.ts) in the Zigbee2MQTT source code.
119
119
120
+
Overrides can be set at the device level or for a specific discovered entity under its `object_id`.
121
+
The entity `object_id` is the part used in the Home Assistant discovery payload, for example `light`, `cover`, `climate`, `temperature`, or a generated composite child such as `manual_default_settings_irrigation_duration`.
122
+
Device-specific overrides are applied after Zigbee2MQTT's built-in compatibility mappings, so they can be used to remove or adjust discovery properties that do not match your installation.
123
+
Set a discovery property to `null` to remove it from the Home Assistant discovery payload.
124
+
120
125
### Changing `supported_color_modes`
121
126
122
127
This is useful for switching light bulbs from reporting values from X/Y (which is the default) to reporting in hue / saturation (which is what bulbs report color in when changing via hue or saturation, such as with the `hue_move` and `saturation_move` commands).
Some devices expose generic capabilities that are not useful for every installation. For example, a cover controller can expose tilt controls even when it is connected to a roller blind without slats, or a thermostat discovery payload can expose modes that should not be offered in Home Assistant. These can be adjusted with per-entity discovery overrides.
176
+
177
+
This example removes the Home Assistant tilt command/status properties from a discovered cover:
178
+
179
+
```yaml
180
+
devices:
181
+
'0x12345678':
182
+
friendly_name: living_room_blind
183
+
homeassistant:
184
+
cover:
185
+
tilt_command_topic: null
186
+
tilt_status_topic: null
187
+
tilt_status_template: null
188
+
tilt_min: null
189
+
tilt_max: null
190
+
tilt_closed_value: null
191
+
tilt_opened_value: null
192
+
```
193
+
194
+
This example limits a climate entity to the modes that should be offered by Home Assistant:
195
+
196
+
```yaml
197
+
devices:
198
+
'0x12345678':
199
+
friendly_name: hallway_thermostat
200
+
homeassistant:
201
+
climate:
202
+
modes: ['off', 'heat', 'auto']
203
+
```
204
+
205
+
### Composite controls
206
+
207
+
When a Zigbee2MQTT expose is a settable composite with numeric or enum child features, Zigbee2MQTT also creates dedicated Home Assistant `number` or `select` entities for those child features. The original composite sensor remains available for viewing the full object.
208
+
209
+
For example, a composite property named `manual_default_settings` with a numeric child property named `irrigation_duration` is discovered as a Home Assistant number entity using the object ID `manual_default_settings_irrigation_duration`. When changed from Home Assistant it publishes only the changed child field:
If a device requires the full composite object when setting a child field, its converter must merge this partial payload with the current state or expose a non-composite control instead.
216
+
168
217
### Changing device properties
169
218
170
219
As an advanced example to show changing any MQTT property can be overridden, the following configuration changes the `suggested_area` property of the `device`. The example shows that you can just copy the given MQTT discovery hierarchy underneath the `homeassistant` property (given that `suggested_area` is underneath the `device` property). Please note, that other `device` properties are possibly set by Zigbee2MQTT (e.g. `manufacturer`).
0 commit comments