resolved missing device bug and new version
This commit is contained in:
parent
0fa82e3681
commit
8413bc65ee
3 changed files with 4 additions and 4 deletions
|
|
@ -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/",
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue