rename secondary entities and add support for configuration type entity
This commit is contained in:
parent
fd2a7a25b2
commit
9b2e332587
@ -160,14 +160,19 @@ namespace Ha {
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
Builder& asSecondary(Component* c) {
|
Builder& addSecondary(Component* c) {
|
||||||
c->mainDevice = &DeviceConfig::create(cmp->id);
|
if (cmp->mainDevice) c->mainDevice = &DeviceConfig::create(cmp->mainDevice->id);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
Builder& asDiagnostic(Component* c) {
|
Builder& addDiagnostic(Component* c) {
|
||||||
c->entityCategory = "diagnostic";
|
c->entityCategory = "diagnostic";
|
||||||
return asSecondary(c);
|
return addSecondary(c);
|
||||||
|
}
|
||||||
|
|
||||||
|
Builder& addConfiguration(Component* c) {
|
||||||
|
c->entityCategory = "config";
|
||||||
|
return addSecondary(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
Builder& asDevice(DeviceConfig* deviceConfig) {
|
Builder& asDevice(DeviceConfig* deviceConfig) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user