added some config and logging

This commit is contained in:
icanos 2020-01-27 20:43:52 +00:00
parent 8413bc65ee
commit c87eee2d2c
6 changed files with 46 additions and 19 deletions

View file

@ -35,7 +35,7 @@ const getSettingsTopic = () => `plejd/settings`;
const getDiscoveryPayload = device => ({
schema: 'json',
name: device.name,
unique_id: device.serialNumber + '_' + device.id,
unique_id: `light.plejd.${device.name.toLowerCase().replace(/ /g, '')}`,
state_topic: getStateTopic(device),
command_topic: getCommandTopic(device),
optimistic: false,