From 732088199e05147d0ac14dcee0ae2dfe912bcb59 Mon Sep 17 00:00:00 2001 From: Darter Date: Fri, 7 Jun 2024 00:38:36 +0200 Subject: [PATCH] support datetime-datetime --- packages/v3/src/esp-entity-table.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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)