added entities as devices and stability in ble
This commit is contained in:
parent
85a194b794
commit
ff1952cd88
3 changed files with 29 additions and 26 deletions
|
|
@ -35,11 +35,19 @@ const getSettingsTopic = () => `plejd/settings`;
|
|||
const getDiscoveryPayload = device => ({
|
||||
schema: 'json',
|
||||
name: device.name,
|
||||
unique_id: `light.plejd.${device.name.toLowerCase().replace(/ /g, '')}`,
|
||||
unique_id: device.serialNumber,
|
||||
state_topic: getStateTopic(device),
|
||||
command_topic: getCommandTopic(device),
|
||||
optimistic: false,
|
||||
brightness: `${device.dimmable}`
|
||||
retain: true,
|
||||
brightness: `${device.dimmable}`,
|
||||
device: {
|
||||
identifiers: device.serialNumber,
|
||||
manufacturer: 'Plejd',
|
||||
model: device.typeName,
|
||||
name: device.name,
|
||||
sw_version: device.version
|
||||
}
|
||||
});
|
||||
|
||||
// #endregion
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue