diff --git a/README.md b/README.md
index d73bff9e..20cf00c8 100644
--- a/README.md
+++ b/README.md
@@ -198,7 +198,8 @@ This card supports several menu configurations.
| Key | Description | Screenshot |
| ------------- | --------------------------------------------- | - |
|`hidden-{top,bottom,right,left}` [default: `hidden-top`]| Hide the menu by default, expandable upon clicking the 'F' button. |
|
-|`overlay-{top,bottom,right,left}`| Overlay the menu on top of the card contents. The 'F' button shows the default view. |
|
+|`overlay-{top,bottom,right,left}`| Overlay the menu over the card contents. The 'F' button shows the default view. |
|
+|`hover-{top,bottom,right,left}`| Overlay the menu over the card contents when the mouse is over the card / touch on the card, otherwise it is not shown. The 'F' button shows the default view. |
|
|`above`| Render the menu above the card. The 'F' button shows the default view. |
|
|`below`| Render the menu below the card. The 'F' button shows the default view. |
|
|`none`| No menu is shown. |
|
diff --git a/src/editor.ts b/src/editor.ts
index 59f28d4b..79a6a0bd 100644
--- a/src/editor.ts
+++ b/src/editor.ts
@@ -115,6 +115,10 @@ export class FrigateCardEditor extends LitElement implements LovelaceCardEditor
'overlay-left': localize('menu_mode.overlay-left'),
'overlay-bottom': localize('menu_mode.overlay-bottom'),
'overlay-right': localize('menu_mode.overlay-right'),
+ 'hover-top': localize('menu_mode.hover-top'),
+ 'hover-left': localize('menu_mode.hover-left'),
+ 'hover-bottom': localize('menu_mode.hover-bottom'),
+ 'hover-right': localize('menu_mode.hover-right'),
above: localize('menu_mode.above'),
below: localize('menu_mode.below'),
};
diff --git a/src/frigate-hass-card.ts b/src/frigate-hass-card.ts
index 3510c528..806e52b8 100644
--- a/src/frigate-hass-card.ts
+++ b/src/frigate-hass-card.ts
@@ -169,12 +169,18 @@ export class FrigateCardMenu extends LitElement {
const classes = {
'frigate-card-menu': true,
'overlay-hidden':
- this.menuMode.startsWith('hidden-') || this.menuMode.startsWith('overlay-'),
+ this.menuMode.startsWith('hidden-') ||
+ this.menuMode.startsWith('overlay-') ||
+ this.menuMode.startsWith('hover-'),
'expanded-horizontal':
- (this.menuMode.startsWith('overlay-') || this.expand) &&
+ (this.menuMode.startsWith('overlay-') ||
+ this.menuMode.startsWith('hover-') ||
+ this.expand) &&
(this.menuMode.endsWith('-top') || this.menuMode.endsWith('-bottom')),
'expanded-vertical':
- (this.menuMode.startsWith('overlay-') || this.expand) &&
+ (this.menuMode.startsWith('overlay-') ||
+ this.menuMode.startsWith('hover-') ||
+ this.expand) &&
(this.menuMode.endsWith('-left') || this.menuMode.endsWith('-right')),
full: ['above', 'below'].includes(this.menuMode),
left: this.menuMode.endsWith('-left'),
@@ -978,9 +984,13 @@ export class FrigateCard extends LitElement {
}
protected _renderMenu(): TemplateResult | void {
+ const classes = {
+ 'hover-menu': this.config.menu_mode.startsWith('hover-'),
+ };
return html`