From b9552f8ab356278bf2c8465f57bf9b602623f065 Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Fri, 20 Apr 2018 19:54:12 +0200 Subject: [PATCH] Support homeassistant discovery for MCCGQ11LM. #9 --- lib/devices.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/devices.js b/lib/devices.js index 5fc198dd..4ebb6a88 100644 --- a/lib/devices.js +++ b/lib/devices.js @@ -34,6 +34,16 @@ const devices = { vendor: 'Xiaomi', description: 'Aqara door & window contact sensor', supports: 'open and closed state', + homeassistant: { + type: 'binary_sensor', + discovery_payload: { + payload_on: 'open', + payload_off: 'closed', + value_template: '{{ value_json.state }}', + device_class: 'door', + json_attributes: ['battery'] + } + } }, 'TRADFRI bulb E27 WS opal 980lm': { model: 'LED1545G12',