From d35cb010dc9331644c2f38c447dc723e6cde2edf Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Mon, 8 Oct 2018 13:21:52 +0200 Subject: [PATCH 1/2] Add device registry to MQTT binary sensor --- .../_components/binary_sensor.mqtt.markdown | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/source/_components/binary_sensor.mqtt.markdown b/source/_components/binary_sensor.mqtt.markdown index 114c974cbbf..84a578189a1 100644 --- a/source/_components/binary_sensor.mqtt.markdown +++ b/source/_components/binary_sensor.mqtt.markdown @@ -115,6 +115,35 @@ force_update: reqired: false type: boolean default: false +device: + description: 'Information about the device this binary sensor is a part of to tie it into the [device registry](https://developers.home-assistant.io/docs/en/device_registry_index.html). Only works through [MQTT discovery](/docs/mqtt/discovery/) and when [`unique_id`](#unique_id) is set.' + required: false + type: map + keys: + identifiers: + description: 'A list of IDs that uniquely identify the device. For example a serial number.' + required: false + type: list, string + connections: + description: 'A list of connections of the device to the outside world as a list of tuples `[connection_type, connection_identifier]`. For example the MAC address of a network interface: `[["mac", "02:5b:26:a8:dc:12"]]`.' + required: false + type: list, tuple + manufacturer: + description: 'The manufacturer of the device.' + required: false + type: string + model: + description: 'The model of the device.' + required: false + type: string + name: + description: 'The name of the device.' + required: false + type: string + sw_version: + description: 'The firmware version of the device.' + required: false + type: string {% endconfiguration %} ## {% linkable_title Examples %} From 81ffdd1ff0d6bea3f394a016dfcdbaef4f2b5a6b Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Mon, 8 Oct 2018 15:10:19 +0200 Subject: [PATCH 2/2] Clarify connections --- source/_components/binary_sensor.mqtt.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_components/binary_sensor.mqtt.markdown b/source/_components/binary_sensor.mqtt.markdown index 84a578189a1..42b94292226 100644 --- a/source/_components/binary_sensor.mqtt.markdown +++ b/source/_components/binary_sensor.mqtt.markdown @@ -125,7 +125,7 @@ device: required: false type: list, string connections: - description: 'A list of connections of the device to the outside world as a list of tuples `[connection_type, connection_identifier]`. For example the MAC address of a network interface: `[["mac", "02:5b:26:a8:dc:12"]]`.' + description: 'A list of connections of the device to the outside world as a list of tuples `[connection_type, connection_identifier]`. For example the MAC address of a network interface: `"connections": [["mac", "02:5b:26:a8:dc:12"]]`.' required: false type: list, tuple manufacturer: