fix possible hash related bug with storing char instead of string into map

This commit is contained in:
Nicu Hodos 2024-10-15 17:07:26 +02:00
parent eb98e0562b
commit 0227340a1f
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/platformio/platformio-core/develop/platformio/assets/schema/library.json",
"name": "ha-mqtt",
"version": "1.3.0",
"version": "1.3.1",
"description": "Home Assistant classes for integration with MQTT auto discovery",
"repository": {
"type": "git",

View File

@ -363,7 +363,7 @@ namespace Ha {
Sensor(const char* name, const char* id) : Component(name, id, "sensor"), StateConfig(this) {
withStateTopic();
mapSensors.insert({ id, this });
mapSensors.insert({ string(id), this });
}
protected: