secondary components: always put the device name in MQTT configuration, even it is just
referenced - new requirement from HA
This commit is contained in:
parent
6a4350a682
commit
69c4222553
@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/platformio/platformio-core/develop/platformio/assets/schema/library.json",
|
||||
"name": "ha-mqtt",
|
||||
"version": "1.1.0",
|
||||
"version": "1.2.0",
|
||||
"description": "Home Assistant classes for integration with MQTT auto discovery",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
2
src/ha.h
2
src/ha.h
@ -212,7 +212,7 @@ namespace Ha {
|
||||
}
|
||||
|
||||
Builder& addSecondary(Component* c) {
|
||||
if (cmp->mainDevice) c->mainDevice = &DeviceConfig::create(cmp->mainDevice->id);
|
||||
if (cmp->mainDevice) c->mainDevice = &DeviceConfig::create(cmp->mainDevice->id).withName(cmp->mainDevice->name);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user