Hello everybody,
I am trying to get a battery warning card on my dashboard shwoing me if any battery needs to be charged. I have a template card with icon and icon color depending on the state of a input.boolean. This works fine.
But I cannot get a browser mod popup working with auto entities card. It only shows me the pop up with the name of the card. No entities showing up:
My code:
type: custom:mushroom-template-card
secondary: Batterie
icon: |
{% if is_state('input_boolean.low_battery', "off") %}
mdi:battery
{% else %}
mdi:battery-10
{% endif %}
layout: vertical
icon_color: |
{% if is_state('input_boolean.low_battery', "off") %}
green
{% else %}
red
{% endif %}
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
title: Batterien
content:
- type: custom:auto-entities
card:
show_header_toggle: false
title: Battery low
type: entities
filter:
include:
- attributes:
device_class: battery
state: <= 20
sort:
method: state
numeric: true
card_mod: null
style: |
ha-card {
/* Set size and spacing of button */
width: 78px;
--spacing: 8px;
padding-bottom: calc(var(--spacing) * 1.618) !important;
/* Styling of button */
background: var(--card-background-color) !important;
box-shadow: var(--ha-card-box-shadow) !important;
border-radius: calc(var(--ha-card-border-radius, 12px) * 1) !important;
/* Center button */
margin-left: auto;
margin-right: auto;
transition: all 0s;
}
/* Add subtle color on hover */
ha-card:hover {
background: color-mix(in srgb, var(--{{ config.icon_color }}-color) 5%, var(--card-background-color)) !important;
}