diff --git a/packages/v2/src/esp-entity-table.ts b/packages/v2/src/esp-entity-table.ts index 6191030..9cc1a30 100644 --- a/packages/v2/src/esp-entity-table.ts +++ b/packages/v2/src/esp-entity-table.ts @@ -302,7 +302,7 @@ class ActionRenderer { const val = (e.target)?.value; this.actioner?.restAction( entity, - `${action}?${opt}=${val}` + `${action}?${opt}=${val.replace('T', ' ')}` ); }}" /> @@ -460,6 +460,19 @@ class ActionRenderer { `; } + render_datetime() { + if (!this.entity) return; + return html` + ${this._datetime( + this.entity, + "datetime-local", + "set", + "value", + this.entity.value, + )} + `; + } + render_text() { if (!this.entity) return; return this._textinput( diff --git a/packages/v3/src/esp-entity-table.ts b/packages/v3/src/esp-entity-table.ts index 3b31e5b..4bc224b 100644 --- a/packages/v3/src/esp-entity-table.ts +++ b/packages/v3/src/esp-entity-table.ts @@ -302,7 +302,7 @@ class ActionRenderer { const val = (e.target)?.value; this.actioner?.restAction( entity, - `${action}?${opt}=${val}` + `${action}?${opt}=${val.replace('T', ' ')}` ); }}" /> @@ -481,6 +481,19 @@ class ActionRenderer { `; } + render_datetime() { + if (!this.entity) return; + return html` + ${this._datetime( + this.entity, + "datetime-local", + "set", + "value", + this.entity.value, + )} + `; + } + render_switch() { if (!this.entity) return; if (this.entity.assumed_state)