Compare commits

..
Author SHA1 Message Date
Paul Bottein 7f71831a73 Read the gauge card entity from the form context 2026-12-02 18:33:51 +01:00
@@ -89,7 +89,7 @@ export class HuiGaugeCardEditor
}
private _schema = memoizeOne(
(localize: LocalizeFunc, entityId?: string) =>
(localize: LocalizeFunc) =>
[
{
name: "entity",
@@ -103,10 +103,10 @@ export class HuiGaugeCardEditor
name: "attribute",
selector: {
attribute: {
entity_id: entityId,
hide_attributes: NON_NUMERIC_ATTRIBUTES,
},
},
context: { filter_entity: "entity" },
},
{
name: "name",
@@ -269,7 +269,7 @@ export class HuiGaugeCardEditor
return nothing;
}
const schema = this._schema(this.hass.localize, this._config!.entity);
const schema = this._schema(this.hass.localize);
const data = {
color_mode: this._colorMode(this._config!),
...this._config,