Merge pull request #52 from icanos/bluez

resolved missing device bug and new version
This commit is contained in:
Marcus Westin 2020-01-24 19:07:26 +01:00 committed by GitHub
commit 1abbea4be1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "Plejd", "name": "Plejd",
"version": "0.3.2", "version": "0.3.3",
"slug": "plejd", "slug": "plejd",
"description": "Adds support for the Swedish home automation devices from Plejd.", "description": "Adds support for the Swedish home automation devices from Plejd.",
"url": "https://github.com/icanos/hassio-plejd/", "url": "https://github.com/icanos/hassio-plejd/",

View file

@ -3,7 +3,7 @@ const mqtt = require('./mqtt');
const fs = require('fs'); const fs = require('fs');
const PlejdService = require('./ble.bluez'); const PlejdService = require('./ble.bluez');
const version = "0.3.2"; const version = "0.3.3";
async function main() { async function main() {
console.log('starting Plejd add-on v. ' + version); console.log('starting Plejd add-on v. ' + version);

View file

@ -35,13 +35,13 @@ const getSettingsTopic = () => `plejd/settings`;
const getDiscoveryPayload = device => ({ const getDiscoveryPayload = device => ({
schema: 'json', schema: 'json',
name: device.name, name: device.name,
unique_id: device.serialNumber, unique_id: device.serialNumber + '_' + device.id,
state_topic: getStateTopic(device), state_topic: getStateTopic(device),
command_topic: getCommandTopic(device), command_topic: getCommandTopic(device),
optimistic: false, optimistic: false,
brightness: `${device.dimmable}`, brightness: `${device.dimmable}`,
device: { device: {
identifiers: device.serialNumber, identifiers: device.serialNumber + '_' + device.id,
manufacturer: 'Plejd', manufacturer: 'Plejd',
model: device.typeName, model: device.typeName,
name: device.name, name: device.name,