diff --git a/plejd/config.json b/plejd/config.json index d5e312a..3f03add 100644 --- a/plejd/config.json +++ b/plejd/config.json @@ -1,6 +1,6 @@ { "name": "Plejd", - "version": "0.3.2", + "version": "0.3.3", "slug": "plejd", "description": "Adds support for the Swedish home automation devices from Plejd.", "url": "https://github.com/icanos/hassio-plejd/", diff --git a/plejd/main.js b/plejd/main.js index 291de76..469d310 100644 --- a/plejd/main.js +++ b/plejd/main.js @@ -3,7 +3,7 @@ const mqtt = require('./mqtt'); const fs = require('fs'); const PlejdService = require('./ble.bluez'); -const version = "0.3.2"; +const version = "0.3.3"; async function main() { console.log('starting Plejd add-on v. ' + version); diff --git a/plejd/mqtt.js b/plejd/mqtt.js index c6b9217..2f9dc20 100644 --- a/plejd/mqtt.js +++ b/plejd/mqtt.js @@ -35,13 +35,13 @@ const getSettingsTopic = () => `plejd/settings`; const getDiscoveryPayload = device => ({ schema: 'json', name: device.name, - unique_id: device.serialNumber, + unique_id: device.serialNumber + '_' + device.id, state_topic: getStateTopic(device), command_topic: getCommandTopic(device), optimistic: false, brightness: `${device.dimmable}`, device: { - identifiers: device.serialNumber, + identifiers: device.serialNumber + '_' + device.id, manufacturer: 'Plejd', model: device.typeName, name: device.name,