mirror of
https://github.com/Hypfer/Valetudo.git
synced 2025-10-26 11:27:27 +00:00
fix(mqtt): Fix Home Assistant object_id generation
This commit is contained in:
parent
ee76222a41
commit
d77480c192
@ -30,10 +30,14 @@ class InLineHassComponent extends HassComponent {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @public
|
||||
* @return {{[key: string]: any}}
|
||||
*/
|
||||
getAutoconf() {
|
||||
return Object.assign(this.autoconf, {
|
||||
name: this.friendlyName,
|
||||
object_id: `${this.hass.objectId}_${this.friendlyName.toLowerCase()}`
|
||||
object_id: `${this.hass.objectId}_${this.friendlyName.toLowerCase().replace(/ /g, "_")}`
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user