diff --git a/gateway/include/devices.h b/gateway/include/devices.h index bc90c58..bb686c5 100644 --- a/gateway/include/devices.h +++ b/gateway/include/devices.h @@ -59,7 +59,7 @@ struct PollinSwitch : Switch { unsigned char channel; PollinSwitch(const char* name, const char* group, const unsigned char channel, const char* area = nullptr) - : Switch(name, [group, channel]{ + : Switch(nullptr, [group, channel]{ // copy id from string into a new pointer, to avoid memory leaks string s = Protocol_1::buildId(group, channel); char* uId = new char[s.length() + 1]; @@ -83,7 +83,7 @@ struct EasyHomeSwitch : Switch { unsigned long off[8] = { 4483146, 4626810, 4661562, 4819642 }; EasyHomeSwitch(const char* name, const char* id, unsigned long on[4], unsigned long off[4], const char* area = nullptr) - : Switch(name, id) { + : Switch(nullptr, id) { memcpy(&this->on[4], on, 4 * sizeof(unsigned long)); memcpy(&this->off[4], off, 4 * sizeof(unsigned long)); mainDevice = &DeviceConfig::create(id).withName(name).withManufacturer("Intertek").withModel("Easy Home").withArea(area).withParent(gatewayDevice); diff --git a/gateway/include/ha.h b/gateway/include/ha.h index 6a56af9..e37bbaa 100644 --- a/gateway/include/ha.h +++ b/gateway/include/ha.h @@ -219,7 +219,6 @@ namespace Ha { void buildConfig(JsonDocument& jsonDoc) override { Command::buildConfig(jsonDoc); - jsonDoc["name"] = nullptr; // jsonDoc["retain"] = true; if (stateTopic[0]) jsonDoc["state_topic"] = stateTopic; }