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;
|
||||
}
|
||||
|
||||
Builder& asSecondary(Component* c) {
|
||||
c->mainDevice = &DeviceConfig::create(cmp->id);
|
||||
Builder& addSecondary(Component* c) {
|
||||
if (cmp->mainDevice) c->mainDevice = &DeviceConfig::create(cmp->mainDevice->id);
|
||||
return *this;
|
||||
}
|
||||
|
||||
Builder& asDiagnostic(Component* c) {
|
||||
Builder& addDiagnostic(Component* c) {
|
||||
c->entityCategory = "diagnostic";
|
||||
return asSecondary(c);
|
||||
return addSecondary(c);
|
||||
}
|
||||
|
||||
Builder& addConfiguration(Component* c) {
|
||||
c->entityCategory = "config";
|
||||
return addSecondary(c);
|
||||
}
|
||||
|
||||
Builder& asDevice(DeviceConfig* deviceConfig) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user