diff --git a/pyproject.toml b/pyproject.toml index 570bc96eaf74..b1f2ee8ea705 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "home-assistant-frontend" -version = "20240103.1" +version = "20240103.3" license = {text = "Apache-2.0"} description = "The Home Assistant frontend" readme = "README.md" diff --git a/src/data/todo.ts b/src/data/todo.ts index 9af8ef0f4cc6..659c8d0c3c24 100644 --- a/src/data/todo.ts +++ b/src/data/todo.ts @@ -83,9 +83,12 @@ export const updateItem = ( item: item.uid, rename: item.summary, status: item.status, - description: item.description || null, + description: item.description, due_datetime: item.due?.includes("T") ? item.due : undefined, - due_date: item.due?.includes("T") ? undefined : item.due || null, + due_date: + item.due === undefined || item.due?.includes("T") + ? undefined + : item.due, }, { entity_id } ); @@ -102,7 +105,10 @@ export const createItem = ( item: item.summary, description: item.description || undefined, due_datetime: item.due?.includes("T") ? item.due : undefined, - due_date: item.due?.includes("T") ? undefined : item.due, + due_date: + item.due === undefined || item.due?.includes("T") + ? undefined + : item.due, }, { entity_id } ); diff --git a/src/panels/lovelace/cards/hui-tile-card.ts b/src/panels/lovelace/cards/hui-tile-card.ts index 1c06426d1acb..b3470aeed569 100644 --- a/src/panels/lovelace/cards/hui-tile-card.ts +++ b/src/panels/lovelace/cards/hui-tile-card.ts @@ -287,21 +287,40 @@ export class HuiTileCard extends LitElement implements LovelaceCard { @eventOptions({ passive: true }) private handleRippleActivate(evt?: Event) { + if (!this.hasCardAction) return; this._rippleHandlers.startPress(evt); } private handleRippleDeactivate() { + if (!this.hasCardAction) return; this._rippleHandlers.endPress(); } private handleRippleMouseEnter() { + if (!this.hasCardAction) return; this._rippleHandlers.startHover(); } private handleRippleMouseLeave() { + if (!this.hasCardAction) return; this._rippleHandlers.endHover(); } + get hasCardAction() { + return ( + !this._config?.tap_action || + hasAction(this._config?.tap_action) || + hasAction(this._config?.hold_action) || + hasAction(this._config?.double_tap_action) + ); + } + + get hasIconAction() { + return ( + !this._config?.icon_tap_action || hasAction(this._config?.icon_tap_action) + ); + } + protected render() { if (!this._config || !this.hass) { return nothing; @@ -368,8 +387,8 @@ export class HuiTileCard extends LitElement implements LovelaceCard { hasHold: hasAction(this._config!.hold_action), hasDoubleClick: hasAction(this._config!.double_tap_action), })} - role="button" - tabindex="0" + role=${ifDefined(this.hasCardAction ? "button" : undefined)} + tabindex=${ifDefined(this.hasCardAction ? "0" : undefined)} aria-labelledby="info" @mousedown=${this.handleRippleActivate} @mouseup=${this.handleRippleDeactivate} @@ -386,8 +405,8 @@ export class HuiTileCard extends LitElement implements LovelaceCard {