[Bugfix] MQTT AutoDiscovery should use HA-compliant SysName

This commit is contained in:
Ton Huisman committed 2026-10-07 21:47:48 +02:00
1 parent 8ca31acb52
commit 85e60c479b
1 file changed
+4 -1
+4 -1
View File
@@ -1019,7 +1019,10 @@ bool MQTT_DiscoveryGetDeviceVType(taskIndex_t TaskIndex,
String MQTT_TaskValueUniqueName(const String& taskName,
const String& valueName) {
String uniqueId = strformat(F("%s_%s_%s"), Settings.getHostname().c_str(), taskName.c_str(), valueName.c_str());
String uniqueId = strformat(F("%s_%s_%s"),
makeHomeAssistantCompliantName(Settings.getHostname()).c_str(),
taskName.c_str(),
valueName.c_str());
uniqueId.toLowerCase();
return uniqueId;