return string when building protocol ids - avoid unused pointers

This commit is contained in:
Nicu Hodos 2024-05-16 10:26:15 +02:00
parent ae95b123ae
commit 0d574b8da1

View File

@ -233,11 +233,11 @@ namespace Ha {
const char* unitMeasure = nullptr;
const char* valueTemplate = nullptr;
Sensor() : Component(name, Protocol_2::buildId(id), "sensor") {
Sensor() : Component(name, id, "sensor") {
withStateTopic();
}
Sensor(const char* name, const char* id) : Component(name, Protocol_2::buildId(id), "sensor") {
Sensor(const char* name, const char* id) : Component(name, id, "sensor") {
withStateTopic();
}