fix possible hash related bug with storing char instead of string into map
This commit is contained in:
parent
eb98e0562b
commit
0227340a1f
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://raw.githubusercontent.com/platformio/platformio-core/develop/platformio/assets/schema/library.json",
|
"$schema": "https://raw.githubusercontent.com/platformio/platformio-core/develop/platformio/assets/schema/library.json",
|
||||||
"name": "ha-mqtt",
|
"name": "ha-mqtt",
|
||||||
"version": "1.3.0",
|
"version": "1.3.1",
|
||||||
"description": "Home Assistant classes for integration with MQTT auto discovery",
|
"description": "Home Assistant classes for integration with MQTT auto discovery",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
2
src/ha.h
2
src/ha.h
@ -363,7 +363,7 @@ namespace Ha {
|
|||||||
|
|
||||||
Sensor(const char* name, const char* id) : Component(name, id, "sensor"), StateConfig(this) {
|
Sensor(const char* name, const char* id) : Component(name, id, "sensor"), StateConfig(this) {
|
||||||
withStateTopic();
|
withStateTopic();
|
||||||
mapSensors.insert({ id, this });
|
mapSensors.insert({ string(id), this });
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user