diff --git a/src/panels/lovelace/components/hui-graph-base.ts b/src/panels/lovelace/components/hui-graph-base.ts
index 089a6410d3..f008244751 100644
--- a/src/panels/lovelace/components/hui-graph-base.ts
+++ b/src/panels/lovelace/components/hui-graph-base.ts
@@ -13,6 +13,8 @@ export class HuiGraphBase extends LitElement {
@state() private _path?: string;
+ private _uniqueId = `graph-${Math.random().toString(36).substring(2, 9)}`;
+
protected render(): TemplateResult {
const width = this.clientWidth || 500;
const height = this.clientHeight || width / 5;
@@ -21,15 +23,15 @@ export class HuiGraphBase extends LitElement {
${this._path
? svg``
: svg``}