# =============================================================================
# Entity Progress Card — Demo dashboard (-dev build variant)
# =============================================================================
# The development bench: every `custom:entity-progress-*` card type targets its
# `-dev` resource (e.g. `entity-progress-card-dev`), so this one only renders
# against a locally-built dev resource (CARD_CONTEXT.dev: true), side by side
# with a production install.
#
# It is a superset of demo-dashboard.yaml: the same showroom views, card for
# card, plus what only a developer runs - the regression view (one card per
# closed bug) and the deprecated-options bench. A card demonstrating an option
# belongs in both files; a card proving a bug stays dead belongs here alone.
#
# 1. Create the demo helpers - three options:
#    a. UI: Settings → Devices & services → Helpers → + Add helper, one by
#       one, using the values from the `# --- helpers ---` block below.
#    b. Paste the `# --- helpers ---` block (uncommented) directly under the
#       matching top-level keys in your configuration.yaml.
#    c. Packages: copy demo-dashboard-helpers.yaml next to your
#       configuration.yaml (or into your packages folder), then reference it:
#         homeassistant:
#           packages:
#             epb_demo: !include demo-dashboard-helpers.yaml
#       (needs `homeassistant: packages:` enabled - see the HA docs on
#       packages if you don't already use them). Reload input_number /
#       input_boolean / timer from Developer Tools → YAML, no restart needed.
# 2. Create a new dashboard (Settings → Dashboards → Add) in YAML mode and
#    paste the `views:` block, or add the cards one by one to any dashboard.
# 3. Move the input_number sliders to see the cards react.
#
# Every card below reuses the same handful of helpers (overriding unit,
# decimal, theme, layout... per card) rather than adding a new one per demo -
# the point is to show how much a single entity's *display* can be reshaped
# without touching the entity itself.
#
# --- helpers (configuration.yaml) ----------------------------------------
# input_number:
#   epb_demo_battery:
#     name: Demo battery
#     min: 0
#     max: 100
#     step: 1
#     initial: 42
#     unit_of_measurement: "%"
#     icon: mdi:battery-50
#   epb_demo_temperature:
#     name: Demo temperature
#     min: -20
#     max: 40
#     step: 0.5
#     initial: 21.5
#     unit_of_measurement: "°C"
#     icon: mdi:thermometer
#   epb_demo_power:
#     name: Demo power
#     min: -3000
#     max: 3000
#     step: 50
#     initial: -750
#     unit_of_measurement: "W"
#     icon: mdi:transmission-tower
#   epb_demo_battery_reserved:
#     name: Demo battery (reserved)
#     min: 0
#     max: 100
#     step: 1
#     initial: 15
#     unit_of_measurement: "%"
#     icon: mdi:battery-lock
#   epb_demo_grid_consumption:
#     name: Demo grid consumption
#     min: 0
#     max: 3000
#     step: 50
#     initial: 900
#     unit_of_measurement: "W"
#     icon: mdi:transmission-tower
#   epb_demo_solar_production:
#     name: Demo solar production
#     min: 0
#     max: 3000
#     step: 50
#     initial: 1600
#     unit_of_measurement: "W"
#     icon: mdi:solar-power
#   epb_demo_printer_ink_black:
#     name: Demo printer ink (black)
#     min: 0
#     max: 100
#     step: 1
#     initial: 78
#     unit_of_measurement: "%"
#     icon: mdi:water
#   epb_demo_printer_ink_cyan:
#     name: Demo printer ink (cyan)
#     min: 0
#     max: 100
#     step: 1
#     initial: 54
#     unit_of_measurement: "%"
#     icon: mdi:water
#   epb_demo_printer_ink_magenta:
#     name: Demo printer ink (magenta)
#     min: 0
#     max: 100
#     step: 1
#     initial: 32
#     unit_of_measurement: "%"
#     icon: mdi:water
#   epb_demo_printer_ink_yellow:
#     name: Demo printer ink (yellow)
#     min: 0
#     max: 100
#     step: 1
#     initial: 9
#     unit_of_measurement: "%"
#     icon: mdi:water
#   epb_demo_theme_25:
#     name: Demo theme ref 25%
#     min: 0
#     max: 100
#     step: 1
#     initial: 25
#     unit_of_measurement: "%"
#   epb_demo_theme_50:
#     name: Demo theme ref 50%
#     min: 0
#     max: 100
#     step: 1
#     initial: 50
#     unit_of_measurement: "%"
#   epb_demo_theme_75:
#     name: Demo theme ref 75%
#     min: 0
#     max: 100
#     step: 1
#     initial: 75
#     unit_of_measurement: "%"
#   epb_demo_theme_95:
#     name: Demo theme ref 95%
#     min: 0
#     max: 100
#     step: 1
#     initial: 95
#     unit_of_measurement: "%"
#   epb_demo_temp_negative:
#     name: Demo temperature ref (negative)
#     min: -20
#     max: 40
#     step: 0.5
#     initial: -10
#     unit_of_measurement: "°C"
#   epb_demo_temp_positive:
#     name: Demo temperature ref (positive)
#     min: -20
#     max: 40
#     step: 0.5
#     initial: 10
#     unit_of_measurement: "°C"
#   epb_demo_temp_temperate:
#     name: Demo temperature ref (temperate)
#     min: -20
#     max: 40
#     step: 0.5
#     initial: 22
#     unit_of_measurement: "°C"
#   epb_demo_temp_hot:
#     name: Demo temperature ref (very hot)
#     min: -20
#     max: 40
#     step: 0.5
#     initial: 35
#     unit_of_measurement: "°C"
#   epb_demo_voc_good:
#     name: Demo VOC ref (good)
#     min: 0
#     max: 50000
#     step: 50
#     initial: 150
#     unit_of_measurement: ppb
#   epb_demo_voc_moderate:
#     name: Demo VOC ref (moderate)
#     min: 0
#     max: 50000
#     step: 50
#     initial: 400
#     unit_of_measurement: ppb
#   epb_demo_voc_poor:
#     name: Demo VOC ref (poor)
#     min: 0
#     max: 50000
#     step: 50
#     initial: 1500
#     unit_of_measurement: ppb
#   epb_demo_voc_bad:
#     name: Demo VOC ref (bad)
#     min: 0
#     max: 50000
#     step: 50
#     initial: 10000
#     unit_of_measurement: ppb
#   epb_demo_voc_hazardous:
#     name: Demo VOC ref (hazardous)
#     min: 0
#     max: 50000
#     step: 50
#     initial: 35000
#     unit_of_measurement: ppb
# input_boolean:
#   epb_demo_printer:
#     name: Demo printer (online)
#     icon: mdi:printer
#   epb_demo_charging:
#     name: Demo battery charging (toggle)
#     icon: mdi:power-plug
# timer:
#   epb_demo_timer:
#     name: Demo timer
#     duration: "00:05:00"
# Real-world use case: a maintenance countdown (aquarium prefilter). The
# card entity is a computed "days remaining" number - the actual state that
# gets reset is the last-maintenance date, via a script (same pattern as a
# real automation), not the number itself.
# input_datetime:
#   epb_demo_maintenance_last:
#     name: Demo maintenance (last done)
#     has_date: true
#     has_time: false
#     initial: "2026-07-15"
# script:
#   epb_demo_reset_maintenance:
#     alias: "Demo: reset maintenance date"
#     sequence:
#       - action: input_datetime.set_datetime
#         target:
#           entity_id: input_datetime.epb_demo_maintenance_last
#         data:
#           timestamp: "{{ now().timestamp() }}"
#   epb_demo_set_maintenance_near_due:
#     alias: "Demo: set maintenance to 2 days before deadline"
#     sequence:
#       - action: input_datetime.set_datetime
#         target:
#           entity_id: input_datetime.epb_demo_maintenance_last
#         data:
#           timestamp: "{{ (now() - timedelta(days=33)).timestamp() }}"
# Percentage + a `battery_charging` attribute on the SAME entity - the shape
# icon_animation: battery_charging / theme: battery_adaptive look for. Not
# available as a UI helper (custom attributes) - use option b/c above.
# template:
#   - sensor:
#       - name: EPB Demo battery (EV)
#         unique_id: epb_demo_battery_ev
#         state: "{{ states('input_number.epb_demo_battery') }}"
#         unit_of_measurement: "%"
#         device_class: battery
#         icon: mdi:battery-charging-50
#         attributes:
#           battery_charging: "{{ is_state('input_boolean.epb_demo_charging', 'on') }}"
#       - name: EPB Demo maintenance days
#         unique_id: epb_demo_maintenance_days
#         state: >-
#           {% set last = states('input_datetime.epb_demo_maintenance_last') | as_datetime | as_local %}
#           {{ 35 - (last.date() - now().date()).days | abs }}
#         unit_of_measurement: days
#         icon: mdi:filter
# --------------------------------------------------------------------------

views:
  - title: EP Showcase
    icon: mdi:image-frame
    path: epb-showcase
    type: sections
    header:
      card:
        type: markdown
        content: '# <ha-icon icon="mdi:progress-helper"></ha-icon> Entity Progress Card Showcase'
        text_only: true
    max_columns: 2
    sections:
      - type: grid
        cards:
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: Living room
            theme: temperature
            bar_color_mode: rainbow_full
            center_zero: true
            min_value: -50
            max_value: 100
            bar_size: xlarge
            status_label: Temperate # shorthand for { jinja: Temperate }
            grid_options:
              columns: 4
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: fan.epb_demo_fan
            name: Ceiling Fan
            icon_animation: spin
            bar_size: large
            grid_options:
              columns: 4
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_theme_95
            theme: light
            name: Light
            bar_color_mode: rainbow
            icon: mdi:book
            bar_position: compact_below
            bar_size: medium
            grid_options:
              columns: 4
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: Battery Cells
            bar_segments: 10
            theme: critical_when_low
            bar_color_mode: segment
            reverse_secondary_info_row: true
            bar_size: small
            grid_options:
              columns: 4
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_litter_level
            name: Litter level
            bar_effect:
              - glass
            color: grey
            grid_options:
              columns: 4
              rows: 1
          - type: tile
            grid_options:
              columns: 4
              rows: 1
            entity: cover.epb_demo_cover
            name: Kitchen (Tile feature)
            vertical: false
            features:
              - type: custom:entity-progress-feature-dev
                entity: input_number.epb_demo_battery
                bar_position: bottom
                bar_color: purple
            features_position: bottom
          - type: tile
            entity: input_boolean.epb_demo_printer
            name: Printer
            features:
              - type: custom:entity-progress-multi-feature-dev
                hide:
                  - icon
                  - name
                decimal: 0
                bar_size: xsmall
                entities:
                  - entity: input_number.epb_demo_printer_ink_black
                    bar_color: black
                  - entity: input_number.epb_demo_printer_ink_cyan
                    bar_color: cyan
                  - entity: input_number.epb_demo_printer_ink_magenta
                    bar_color: magenta
                  - entity: input_number.epb_demo_printer_ink_yellow
                    bar_color: yellow
            grid_options:
              columns: 4
              rows: 1
          - type: custom:entity-progress-card-template-dev
            entity: sun.sun
            name: >
              {% set sunrise = as_datetime(states('sensor.sun_next_rising')) %}
              {% set sunset = as_datetime(states('sensor.sun_next_setting')) %}
              {% set now_time = now() %} {% if sunrise and sunset %}
                {% if sunrise < sunset %}
                  Next Rise: {{ sunrise.timestamp() | timestamp_custom('%H:%M', true) }}
                {% else %}
                  Next Setting: {{ sunset.timestamp() | timestamp_custom('%H:%M', true) }}
                {% endif %}
              {% else %}
                Sun information not available
              {% endif %}
            bar_color: |
              {% if states('sun.sun') == 'below_horizon' %}
                blue
              {% else %}
                orange
              {% endif %}
            color: |
              {% if states('sun.sun') == 'below_horizon' %}
                blue
              {% else %}
                orange
              {% endif %}
            secondary: >
              {% set sunrise = as_datetime(states('sensor.sun_next_rising')) %}
              {% set sunset = as_datetime(states('sensor.sun_next_setting')) %}
              {% set now_time = now() %} {% if sunrise and sunset %}
                {% if sunrise < sunset %}
                  {% set next_event = sunrise %}
                  {% set last_event = sunrise - timedelta(days=1) %}
                {% else %}
                  {% set next_event = sunset %}
                  {% set last_event = sunset - timedelta(days=1) %}
                {% endif %}
                {% set delta = next_event - now_time %}
                {% set total_seconds = delta.total_seconds() %}
                {% if total_seconds > 1 %}
                  {% set days = (total_seconds // 86400) | int %}
                  {% set hours = (total_seconds % 86400) // 3600 %}
                  {% set minutes = (total_seconds % 3600) // 60 %}
                  {% set seconds = (total_seconds % 60) %}
                  in
                  {% if days > 0 %}
                    {{ days }}d
                  {% endif %}
                  {{ '%02d:%02d:%02d' | format(hours | int, minutes | int, seconds | int) }}
                {% else %}
                  now
                {% endif %}
              {% else %}
                --:--:--
              {% endif %}
            percent: >
              {% set sunrise = as_datetime(states('sensor.sun_next_rising')) %}
              {% set sunset = as_datetime(states('sensor.sun_next_setting')) %}
              {% set now_time = now() %} {% if sunrise and sunset %}
                {% if sunrise < sunset %}
                  {% set next_event = sunrise %}
                  {% set last_event = sunrise - timedelta(days=1) %}
                {% else %}
                  {% set next_event = sunset %}
                  {% set last_event = sunset - timedelta(days=1) %}
                {% endif %}
                {% set total = (next_event - last_event).total_seconds() %}
                {% set elapsed = (now_time - last_event).total_seconds() %}
                {% if total > 0 %}
                  {{ ((elapsed / total) * 100) | round(2) }}
                {% else %}
                  0
                {% endif %}
              {% else %}
                0
              {% endif %}
            tap_action:
              action: more-info
            fast_refresh: true
            bar_effect:
              - radius
            grid_options:
              columns: 6
              rows: 1
      - type: grid
        cards:
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_hot
            theme: temperature
            layout: vertical
            alert_when:
              above: 30
              color: red
              highlight: label
              label: hot
              animation: ping
            name: Garage
            bar_position: default
            bar_size: small
            max_value: 40
            decimal: 1
            bar_color_mode: rainbow_full
            grid_options:
              columns: 3
              rows: 2
          - type: tile
            entity: sensor.epb_demo_energy_net
            icon: mdi:transmission-tower
            name: Energy (consumption vs production)
            features:
              - type: custom:entity-progress-multi-feature-dev
                hide:
                  - icon
                  - name
                bar_size: medium
                decimal: 0
                entities:
                  - entity: input_number.epb_demo_grid_consumption
                    bar_color: blue
                    max_value: 3000
                  - entity: input_number.epb_demo_solar_production
                    bar_color: green
                    max_value: 3000
              - type: custom:entity-progress-feature-dev
                entity: input_number.epb_demo_solar_production
                center_zero: true
                min_value: -3000
                max_value: 3000
                bar_color: green
                bar_stack:
                  mode: net
                  entities:
                    - entity: input_number.epb_demo_grid_consumption
                      subtract: true
                      color: blue
            grid_options:
              columns: 9
              rows: 3
          - type: custom:entity-progress-card-dev
            entity: sensor.epb_demo_battery_ev
            name: Phone
            density: compact
            bar_position: bottom
            hide: []
            theme: battery_adaptive
            bar_color_mode: rainbow
            icon_animation: battery_charging
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_printer_ink_yellow
            name: Ink
            density: compact
            bar_position: background
            color: accent
            bar_color: accent
          - type: custom:entity-progress-card-dev
            entity: timer.epb_demo_timer
            icon: mdi:washing-machine
            bar_size: medium
            reverse: true
            unit: flextimer
            name: Washing machine
            bar_orientation: rtl
            state_content:
              - state
            icon_animation: washing_machine
            grid_options:
              columns: 4
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: sensor.epb_demo_maintenance_days
            name: Maintenance countdown
            bar_orientation: rtl
            unit: days
            max_value: 35
            theme: critical_when_low
            layout: horizontal
            decimal: 0
            alert_when:
              below: 3
            bar_color_mode: rainbow
            double_tap_action:
              action: call-service
              service: script.epb_demo_reset_maintenance
            hold_action:
              action: call-service
              service: script.epb_demo_set_maintenance_near_due
            icon: mdi:fish
            grid_options:
              columns: 4
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: climate.epb_demo_thermostat
            name: Thermostat
            bar_position: icon
            bar_size: large
            min_value: 0
            max_value: 40
    badges:
      - type: custom:entity-progress-badge-dev
        entity: input_number.epb_demo_theme_95
        name: Storage
        icon: mdi:harddisk
        theme: critical_when_high
        bar_color_mode: rainbow
        alert_when:
          above: 90
          color: red
          highlight: border
          animation: ping
      - type: custom:entity-progress-badge-dev
        entity: sensor.epb_demo_battery_ev
        theme: battery_adaptive
        bar_color_mode: rainbow_full
        name: Battery EV
      - type: custom:entity-progress-badge-dev
        entity: cover.epb_demo_cover
    show_icon_and_title: true
    cards: []
  - title: EP Demo - Standard, unit & decimal
    icon: mdi:flask-outline
    path: epb-standard
    type: sections
    max_columns: 2
    sections:
      - type: grid
        cards:
          - type: heading
            heading: Card, Badge, Template & Feature — the standard set
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              name: entity-progress-card
              ```
              The same entity, shown through the three basic building blocks:
              the standalone **card**, a Tile **feature** (bare bar, no
              frame - HA's own tile already provides one), and the
              Jinja-driven **template** variant (icon/name/percent all
              resolved from templates instead of reading the entity
              directly, so it works without a bound `entity` at all).
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: entity-progress-card
            grid_options:
              columns: 6
              rows: 1
          - type: tile
            entity: input_number.epb_demo_battery
            name: entity-progress-feature (Tile)
            features:
              - type: custom:entity-progress-feature-dev
                entity: input_number.epb_demo_battery
            grid_options:
              columns: 6
              rows: 2
          - type: custom:entity-progress-card-template-dev
            entity: input_number.epb_demo_battery
            name: entity-progress-card-template
            secondary: '{{ states(entity) }}%'
            percent: '{{ states(entity) }}'
            grid_options:
              columns: 6
              rows: 1
        column_span: 1
      - type: grid
        cards:
          - type: heading
            heading: From the original demo — bar_stack & center_zero
            heading_style: title
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: Glass & radius
            bar_effect:
              - radius
              - glass
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: Bar stack (charged + reserved)
            bar_stack:
              entities:
                - entity: input_number.epb_demo_battery_reserved
                  color: orange
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_printer_ink_cyan
            name: Bar stack (proportional circuits)
            max_value: 200
            bar_stack:
              mode: proportional
              entities:
                - entity: input_number.epb_demo_printer_ink_magenta
                - entity: input_number.epb_demo_printer_ink_yellow
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_power
            name: Center zero (grid power)
            center_zero: true
            min_value: -3000
            max_value: 3000
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_grid_consumption
            name: Net balance (consumption − production)
            center_zero: true
            min_value: -3000
            max_value: 3000
            bar_stack:
              mode: net
              entities:
                - entity: input_number.epb_demo_solar_production
                  subtract: true
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_solar_production
            name: 'Energy: production (+) vs consumption (−)'
            center_zero: true
            min_value: -3000
            max_value: 3000
            bar_stack:
              entities:
                - entity: input_number.epb_demo_grid_consumption
                  subtract: true
                  color: red
          - type: custom:entity-progress-card-dev
            entity: timer.epb_demo_timer
            name: Timer (start it!)
            tap_action:
              action: call-service
              service: timer.start
              target:
                entity_id: timer.epb_demo_timer
      - type: grid
        cards:
          - type: heading
            heading: unit — with/without, with/without space
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_temperature
              unit: kW              # override the entity's own unit_of_measurement
              unit_spacing: space   # auto | space | no-space
              hide: [unit]          # or drop the unit entirely
              ```
              What varies below: the default (native unit, spaced), an
              overridden unit, `no-space`/`space` spacing, hiding the unit
              via `hide`, an empty `unit: ""` (blank text, no space either),
              and `unit_position: before` for a currency-style prefix.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: Default (native unit, spaced)
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: 'unit: kW (override)'
            unit: kW
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: 'hide: [unit]'
            hide:
              - unit
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: 'unit_spacing: no-space'
            unit_spacing: no-space
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: 'unit_spacing: space'
            unit: '%'
            unit_spacing: space
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: "unit: '' (blank, no space either)"
            unit: ''
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: 'unit_position: before ($ prefix)'
            unit: '$'
            unit_position: before
            unit_spacing: no-space
      - type: grid
        cards:
          - type: heading
            heading: value_compact — abbreviate large values
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: sensor.total_energy
              value_compact: true   # 1250000 -> "1.3M" instead of "1,250,000"
              ```
              `decimal` still caps the fraction digits, but trailing zeros are
              trimmed - `1.3M`, never `1.30M`.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_total_energy
            name: Default (full number)
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_total_energy
            name: 'value_compact: true'
            value_compact: true
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_total_energy
            name: 'value_compact + decimal: 2'
            value_compact: true
            decimal: 2
      - type: grid
        cards:
          - type: heading
            heading: decimal — automatic, 1, 2, 3
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_temperature
              unit: °C
              decimal: 1   # left unset: derived automatically from the entity
              ```
              `decimal` controls how many digits the displayed value shows -
              left unset it's derived automatically (from the entity's own
              precision, or a sensible per-type default).
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: decimal unset (automatic)
            unit: °C
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: 'decimal: 1'
            unit: °C
            decimal: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: 'decimal: 2'
            unit: °C
            decimal: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: 'decimal: 3'
            unit: °C
            decimal: 3
      - type: grid
        cards:
          - type: heading
            heading: Content & text
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              hide: [icon, unit]   # any of: icon, name, unit, secondary_info, value
              state_content: [state, last_changed]
              multiline: true
              custom_info: "Feels like {{ states(entity) | float - 2 }} °C"
              name_info: "{% if states(entity) | float < 20 %}⚠️ low{% endif %}"
              reverse_secondary_info_row: true
              ```
              What varies below: hiding individual parts (`hide`), swapping
              what `secondary_info` shows (`state_content`), a second line
              (`multiline` + `custom_info`), a small aside next to the name
              (`name_info`), flipping the secondary-info row's order, and
              text placed directly over the bar (`bar_position: background`/
              `overlay` + `text_effect`/`bar_single_line`).
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'hide: [icon, unit]'
            hide:
              - icon
              - unit
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'hide: [name, secondary_info] (bar + icon only)'
            hide:
              - name
              - secondary_info
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'state_content: [state, last_changed]'
            state_content:
              - state
              - last_changed
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: reverse_secondary_info_row
            reverse_secondary_info_row: true
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: multiline (custom_info on its own line)
            multiline: true
            custom_info: Feels like {{ states(entity) | float - 2 }} °C
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: name_info (Jinja, next to the name)
            name_info: '{% if states(entity) | float < 20 %}⚠️ low{% endif %}'
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'bar_position: background + text_effect: shadow'
            bar_position: background
            text_effect: shadow
            color: white
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'text_effect: halo'
            bar_position: overlay
            text_effect: halo
            bar_color: yellow
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'text_effect: outline'
            bar_position: overlay
            text_effect: outline
            bar_color: yellow
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'text_effect: plate'
            bar_position: overlay
            text_effect: plate
            bar_color: yellow
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'text_effect: contrast (yellow)'
            bar_position: overlay
            text_effect: contrast
            bar_color: yellow
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'text_effect: contrast (lime)'
            bar_position: overlay
            text_effect: contrast
            bar_color: lime
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'text_effect: contrast (cyan)'
            bar_position: overlay
            text_effect: contrast
            bar_color: cyan
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'text_effect: contrast (theme gradient)'
            bar_position: overlay
            text_effect: contrast
            theme: optimal_when_high
            bar_color_mode: rainbow
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'bar_position: overlay + bar_single_line'
            bar_position: overlay
            bar_single_line: true
      - type: grid
        cards:
          - type: heading
            heading: More data sources
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: sun.sun
              attribute: elevation   # read an attribute instead of the state
              max_value:
                entity: input_number.epb_demo_battery_reserved   # ...or another entity
              min_value:
                jinja: "{{ 5 }}"                                 # ...or a Jinja template
              ```
              `entity`/`attribute`/`min_value`/`max_value` don't have to be a
              plain number or the bare state - an attribute on the same
              entity, another entity's own state, or a Jinja template all
              work the same way.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: sun.sun
            attribute: elevation
            name: attribute (sun.sun's own elevation, no helper needed)
            min_value: -90
            max_value: 90
            center_zero: true
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'max_value: {entity} (dynamic, from another entity)'
            max_value:
              entity: input_number.epb_demo_battery_reserved
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'min_value: {jinja}'
            min_value:
              jinja: '{{ 5 }}'
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'reverse: true (fills from the other end)'
            reverse: true
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_grid_consumption
            name: 'bar_stack mode: proportional'
            center_zero: true
            min_value: -3000
            max_value: 3000
            bar_stack:
              mode: proportional
              entities:
                - entity: input_number.epb_demo_solar_production
                  subtract: true
                  color: green
      - type: grid
        cards:
          - type: heading
            heading: Templates — icon/color/bar_color in Jinja, fast_refresh
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-template-dev
              entity: input_number.epb_demo_battery
              percent: "{{ states(entity) }}"
              icon: "{% if states(entity) | float > 20 %}mdi:battery-alert{% else %}mdi:battery{% endif %}"
              color: "{% if states(entity) | float < 20 %}red{% else %}green{% endif %}"
              fast_refresh: true   # force a render every tick (countdowns)
              ```
              The **template** card resolves `icon`/`color`/`bar_color`/
              `percent` from Jinja instead of reading the entity directly.
              `fast_refresh: true` keeps a ticking countdown accurate every
              second - HA only pushes a fresh template render once a minute
              on its own otherwise.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-template-dev
            entity: input_number.epb_demo_battery
            name: icon (Jinja)
            percent: '{{ states(entity) }}'
            icon: >-
              {% if states(entity) | float > 20 %}mdi:battery-alert {% else
              %}mdi:battery{% endif %}
          - type: custom:entity-progress-card-template-dev
            entity: input_number.epb_demo_battery
            name: color (Jinja)
            percent: '{{ states(entity) }}'
            color: '{% if states(entity) | float < 20 %}red{% else %}green{% endif %}'
          - type: custom:entity-progress-card-template-dev
            entity: input_number.epb_demo_battery
            name: bar_color (Jinja)
            percent: '{{ states(entity) }}'
            bar_color: '{% if states(entity) | float < 20 %}red{% else %}green{% endif %}'
          - type: custom:entity-progress-card-template-dev
            entity: input_number.epb_demo_temperature
            name: 'alert_when.jinja (Template, object only)'
            percent: >-
              {{ (states(entity) | float - (-20)) / (40 - (-20)) * 100 }}
            alert_when:
              jinja: >-
                {% set t = states(entity) | float %} {% if t < 10 %}{{
                {'color': 'blue', 'highlight': 'background', 'animation':
                'ping'} }} {% else %}false{% endif %}
          - type: custom:entity-progress-card-template-dev
            entity: timer.epb_demo_timer
            name: 'fast_refresh: true — real ticking MM:SS (start the timer!)'
            fast_refresh: true
            secondary: >-
              {% set remaining = as_datetime(state_attr(entity, 'finishes_at'))
              - now() %} {{ '%02d:%02d' % (remaining.seconds // 60,
              remaining.seconds % 60) }}
            percent: >-
              {% set remaining = as_datetime(state_attr(entity, 'finishes_at'))
              - now() %} {# helper's own duration is fixed at 5 minutes (300s) -
              see the timer.epb_demo_timer helper at the top of this file #} {{
              (remaining.total_seconds() / 300 * 100) | round(1) }}
            tap_action:
              action: call-service
              service: timer.start
              target:
                entity_id: timer.epb_demo_timer
      - type: grid
        cards:
          - type: heading
            heading: Actions & badge min_width
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              tap_action:
                action: more-info
              hold_action:
                action: none
              double_tap_action:
                action: toggle
              icon_tap_action:        # the icon can have its own, separate actions
                action: navigate
                navigation_path: /config/helpers
              ```
              `tap_action`/`hold_action`/`double_tap_action` on the card
              itself, and a fully separate set on just the icon
              (`icon_tap_action`/`icon_hold_action`/`icon_double_tap_action`)
              - plus `name` as a composed list of tokens instead of a plain
              string.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'tap: more-info / hold: none / double: toggle'
            tap_action:
              action: more-info
            hold_action:
              action: none
            double_tap_action:
              action: toggle
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'icon_tap_action: navigate'
            icon_tap_action:
              action: navigate
              navigation_path: /config/helpers
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: icon_hold_action / icon_double_tap_action
            icon_hold_action:
              action: more-info
            icon_double_tap_action:
              action: toggle
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name:
              - type: text
                text: 'name: composition — '
              - type: entity
      - type: grid
        cards:
          - type: heading
            heading: Ellipsis
            heading_style: title
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            decimal: 1
            layout: horizontal
            bar_size: xlarge
            unit: >-
              iuuiouioiiouuoiuiouiouoiukljjh jklshsdjhjsd sjkdhf sdjfh sdkjfh
              skjdfhkj tjhertg ejrg ekrgjhjerghkj
            name: >-
              jhhkhjhkjhkjhkjhkhjkhergjhekrjh erjgh ejr kjgehr gkjher gjer
              gjkher. erjghekrhgjehrkgjkergh
            grid_options:
              columns: 6
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            decimal: 1
            layout: vertical
            unit: >-
              iuuiouioiiouuoiuiouiouoiukljjh jklshsdjhjsd sjkdhf sdjfh sdkjfh
              skjdfhkj tjhertg ejrg ekrgjhjerghkj
            name: >-
              jhhkhjhkjhkjhkjhkhjkhergjhekrjh erjgh ejr kjgehr gkjher gjer
              gjkher. erjghekrhgjehrkgjkergh
            grid_options:
              columns: 6
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            decimal: 1
            layout: horizontal
            unit: >-
              iuuiouioiiouuoiuiouiouoiukljjh jklshsdjhjsd sjkdhf sdjfh sdkjfh
              skjdfhkj tjhertg ejrg ekrgjhjerghkj
            name: >-
              jhhkhjhkjhkjhkjhkhjkhergjhekrjh erjgh ejr kjgehr gkjher gjer
              gjkher. erjghekrhgjehrkgjkergh
            grid_options:
              columns: 6
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            decimal: 1
            layout: horizontal
            unit: >-
              iuuiouioiiouuoiuiouiouoiukljjh jklshsdjhjsd sjkdhf sdjfh sdkjfh
              skjdfhkj tjhertg ejrg ekrgjhjerghkj
            name: >-
              jhhkhjhkjhkjhkjhkhjkhergjhekrjh erjgh ejr kjgehr gkjher gjer
              gjkher. erjghekrhgjehrkgjkergh
            bar_position: top
            grid_options:
              columns: 6
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            decimal: 1
            layout: horizontal
            unit: >-
              iuuiouioiiouuoiuiouiouoiukljjh jklshsdjhjsd sjkdhf sdjfh sdkjfh
              skjdfhkj tjhertg ejrg ekrgjhjerghkj
            name: >-
              jhhkhjhkjhkjhkjhkhjkhergjhekrjh erjgh ejr kjgehr gkjher gjer
              gjkher. erjghekrhgjehrkgjkergh
            bar_position: overlay
            grid_options:
              columns: 6
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            decimal: 1
            layout: horizontal
            unit: >-
              iuuiouioiiouuoiuiouiouoiukljjh jklshsdjhjsd sjkdhf sdjfh sdkjfh
              skjdfhkj tjhertg ejrg ekrgjhjerghkj
            name: >-
              jhhkhjhkjhkjhkjhkhjkhergjhekrjh erjgh ejr kjgehr gkjher gjer
              gjkher. erjghekrhgjehrkgjkergh
            bar_position: background
            color: white
            grid_options:
              columns: 6
              rows: 1
        column_span: 2
      - type: grid
        cards:
          - type: heading
            heading: Error / edge-case states
            heading_style: title
          - type: custom:entity-progress-card-dev
            entity: sensor.epb_demo_unavailable
            name: unavailable entity
          - type: custom:entity-progress-card-dev
            entity: sensor.epb_demo_unknown
            name: unknown state
          - type: custom:entity-progress-card-dev
            entity: sensor.epb_demo_unicorn_speed
            name: "entity doesn't exist"
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            attribute: this_attribute_does_not_exist
            name: attribute not found
      - type: grid
        cards:
          - type: heading
            heading: 'Compare with tile — different device classes'
            heading_style: title
          - type: custom:entity-progress-card-dev
            entity: fan.epb_demo_fan
            name: fan
            grid_options:
              columns: 6
              rows: 1
          - type: tile
            entity: fan.epb_demo_fan
            grid_options:
              columns: 6
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: sensor.epb_demo_battery_ev
            name: battery
            grid_options:
              columns: 6
              rows: 1
          - type: tile
            entity: sensor.epb_demo_battery_ev
            grid_options:
              columns: 6
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: cover.epb_demo_cover
            name: cover
            grid_options:
              columns: 6
              rows: 1
          - type: tile
            entity: cover.epb_demo_cover
            grid_options:
              columns: 6
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: light.epb_demo_light
            name: light
            grid_options:
              columns: 6
              rows: 1
          - type: tile
            entity: light.epb_demo_light
            grid_options:
              columns: 6
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: climate.epb_demo_thermostat
            name: climate
            grid_options:
              columns: 6
              rows: 1
          - type: tile
            entity: climate.epb_demo_thermostat
            grid_options:
              columns: 6
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: timer.epb_demo_timer
            name: timer
            grid_options:
              columns: 6
              rows: 1
          - type: tile
            entity: timer.epb_demo_timer
            grid_options:
              columns: 6
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: counter.epb_demo_counter
            name: 'counter (tap +1 / hold -1 / dbl reset)'
            tap_action:
              action: call-service
              service: counter.increment
              target:
                entity_id: counter.epb_demo_counter
            hold_action:
              action: call-service
              service: counter.decrement
              target:
                entity_id: counter.epb_demo_counter
            double_tap_action:
              action: call-service
              service: counter.reset
              target:
                entity_id: counter.epb_demo_counter
            grid_options:
              columns: 6
              rows: 1
          - type: tile
            entity: counter.epb_demo_counter
            grid_options:
              columns: 6
              rows: 1
    badges:
      - type: entity
        show_name: false
        show_state: true
        show_icon: true
        entity: sensor.sun_next_noon
        name: Tile example
      - type: custom:entity-progress-badge-dev
        entity: input_number.epb_demo_battery
        name: entity-progress-badge
      - type: custom:entity-progress-badge-template-dev
        entity: input_number.epb_demo_battery
        name: entity-progress-badge-template
        secondary: '{{ states(entity) }}%'
        percent: '{{ states(entity) }}'
      - type: custom:entity-progress-badge-dev
        entity: input_number.epb_demo_battery
        name: 'min_width: 50% (badge-specific, #124)'
        min_width: 50%
      - type: custom:entity-progress-badge-dev
        entity: input_number.epb_demo_battery
        name: 'badge_icon / badge_color (Jinja)'
    cards: []
    show_icon_and_title: true
  - title: EP Demo - Theme, watermarks & effects
    icon: mdi:flask-outline
    path: epb-appearance
    type: sections
    max_columns: 2
    sections:
      - type: grid
        cards:
          - type: heading
            heading: Same theme, different % (optimal_when_high)
            heading_style: title
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_theme_95
            theme: optimal_when_high
            name: optimal_when_high
            bar_color_mode: segment
            icon: mdi:book
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            name: 25%
            entity: input_number.epb_demo_theme_25
            theme: optimal_when_high
          - type: custom:entity-progress-card-dev
            name: 50%
            entity: input_number.epb_demo_theme_50
            theme: optimal_when_high
          - type: custom:entity-progress-card-dev
            name: 75%
            entity: input_number.epb_demo_theme_75
            theme: optimal_when_high
          - type: custom:entity-progress-card-dev
            name: 95%
            entity: input_number.epb_demo_theme_95
            theme: optimal_when_high
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_theme_95
            theme: optimal_when_high
            name: optimal_when_high
            bar_color_mode: rainbow
            icon: mdi:book
            grid_options:
              columns: 12
              rows: 1
      - type: grid
        cards:
          - type: heading
            heading: Same theme, different % (optimal_when_low)
            heading_style: title
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_theme_95
            theme: optimal_when_low
            name: optimal_when_low
            bar_color_mode: segment
            icon: mdi:book
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            name: 25%
            entity: input_number.epb_demo_theme_25
            theme: optimal_when_low
          - type: custom:entity-progress-card-dev
            name: 50%
            entity: input_number.epb_demo_theme_50
            theme: optimal_when_low
          - type: custom:entity-progress-card-dev
            name: 75%
            entity: input_number.epb_demo_theme_75
            theme: optimal_when_low
          - type: custom:entity-progress-card-dev
            name: 95%
            entity: input_number.epb_demo_theme_95
            theme: optimal_when_low
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_theme_95
            theme: optimal_when_low
            name: optimal_when_low
            bar_color_mode: rainbow
            icon: mdi:book
            grid_options:
              columns: 12
              rows: 1
      - type: grid
        cards:
          - type: heading
            heading: Same theme, different % (critical_when_low)
            heading_style: title
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_theme_95
            theme: critical_when_low
            name: critical_when_low
            bar_color_mode: segment
            icon: mdi:book
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            name: 25%
            entity: input_number.epb_demo_theme_25
            theme: critical_when_low
          - type: custom:entity-progress-card-dev
            name: 50%
            entity: input_number.epb_demo_theme_50
            theme: critical_when_low
          - type: custom:entity-progress-card-dev
            name: 75%
            entity: input_number.epb_demo_theme_75
            theme: critical_when_low
          - type: custom:entity-progress-card-dev
            name: 95%
            entity: input_number.epb_demo_theme_95
            theme: critical_when_low
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_theme_95
            theme: critical_when_low
            name: critical_when_low
            bar_color_mode: rainbow
            icon: mdi:book
            grid_options:
              columns: 12
              rows: 1
      - type: grid
        cards:
          - type: heading
            heading: Same theme, different % (critical_when_high)
            heading_style: title
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_theme_95
            theme: critical_when_high
            name: critical_when_high
            bar_color_mode: segment
            icon: mdi:book
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            name: 25%
            entity: input_number.epb_demo_theme_25
            theme: critical_when_high
          - type: custom:entity-progress-card-dev
            name: 50%
            entity: input_number.epb_demo_theme_50
            theme: critical_when_high
          - type: custom:entity-progress-card-dev
            name: 75%
            entity: input_number.epb_demo_theme_75
            theme: critical_when_high
          - type: custom:entity-progress-card-dev
            name: 95%
            entity: input_number.epb_demo_theme_95
            theme: critical_when_high
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_theme_95
            theme: critical_when_high
            name: critical_when_high
            bar_color_mode: rainbow
            icon: mdi:book
            grid_options:
              columns: 12
              rows: 1
      - type: grid
        cards:
          - type: heading
            heading: Same theme, different % (humidity)
            heading_style: title
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_theme_95
            theme: humidity
            name: humidity
            bar_color_mode: segment
            icon: mdi:book
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            name: 25%
            entity: input_number.epb_demo_theme_25
            theme: humidity
          - type: custom:entity-progress-card-dev
            name: 50%
            entity: input_number.epb_demo_theme_50
            theme: humidity
          - type: custom:entity-progress-card-dev
            name: 75%
            entity: input_number.epb_demo_theme_75
            theme: humidity
          - type: custom:entity-progress-card-dev
            name: 95%
            entity: input_number.epb_demo_theme_95
            theme: humidity
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_theme_95
            theme: humidity
            name: humidity
            bar_color_mode: rainbow
            icon: mdi:book
            grid_options:
              columns: 12
              rows: 1
      - type: grid
        cards:
          - type: heading
            heading: Same theme, different % (temperature)
            heading_style: title
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_hot
            theme: temperature
            name: temperature
            bar_color_mode: segment
            icon: mdi:book
            max_value: 40
            center_zero: false
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_negative
            name: negative
            theme: temperature
            center_zero: true
            min_value: -20
            max_value: 40
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_positive
            name: positive
            theme: temperature
            max_value: 40
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_temperate
            name: temperate
            theme: temperature
            max_value: 40
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_hot
            name: hot
            theme: temperature
            max_value: 40
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_hot
            theme: temperature
            name: temperature
            bar_color_mode: rainbow
            icon: mdi:book
            max_value: 40
            center_zero: false
            grid_options:
              columns: 12
              rows: 1
      - type: grid
        cards:
          - type: heading
            heading: 'status_label: glacial → scorching (temperature)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_temp_negative
              theme: temperature
              max_value: 40
              status_label:
                jinja: >-
                  {% set t = states(entity) | float %}
                  {% if t < -5 %}glacial
                  {% elif t < 5 %}cold
                  {% elif t < 15 %}cool
                  {% elif t < 25 %}temperate
                  {% elif t < 32 %}warm
                  {% else %}scorching
                  {% endif %}
              ```
              Same 4 reference temperatures as the section above
              (-10/10/22/35°C), with `status_label` added - established weather-report
              terms instead of a plain cold/hot split, still just a Jinja
              condition on the value, no zone list to keep in sync with the
              theme.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_negative
            name: negative
            theme: temperature
            center_zero: true
            min_value: -20
            max_value: 40
            status_label:
              jinja: >-
                {% set t = states('input_number.epb_demo_temp_negative') |
                float %} {% if t < -5 %}glacial {% elif t < 5 %}cold {% elif t
                < 15 %}cool {% elif t < 25 %}temperate {% elif t < 32 %}warm
                {% else %}scorching {% endif %}
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_positive
            name: positive
            theme: temperature
            max_value: 40
            status_label:
              jinja: >-
                {% set t = states('input_number.epb_demo_temp_positive') |
                float %} {% if t < -5 %}glacial {% elif t < 5 %}cold {% elif t
                < 15 %}cool {% elif t < 25 %}temperate {% elif t < 32 %}warm
                {% else %}scorching {% endif %}
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_temperate
            name: temperate
            theme: temperature
            max_value: 40
            status_label:
              jinja: >-
                {% set t = states('input_number.epb_demo_temp_temperate') |
                float %} {% if t < -5 %}glacial {% elif t < 5 %}cold {% elif t
                < 15 %}cool {% elif t < 25 %}temperate {% elif t < 32 %}warm
                {% else %}scorching {% endif %}
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_hot
            name: hot
            theme: temperature
            max_value: 40
            status_label:
              jinja: >-
                {% set t = states('input_number.epb_demo_temp_hot') | float
                %} {% if t < -5 %}glacial {% elif t < 5 %}cold {% elif t < 15
                %}cool {% elif t < 25 %}temperate {% elif t < 32 %}warm {%
                else %}scorching {% endif %}
      - type: grid
        cards:
          - type: heading
            heading: Same theme, different % (light)
            heading_style: title
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_theme_95
            theme: light
            name: light
            bar_color_mode: segment
            icon: mdi:book
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            name: 25%
            entity: input_number.epb_demo_theme_25
            theme: light
          - type: custom:entity-progress-card-dev
            name: 50%
            entity: input_number.epb_demo_theme_50
            theme: light
          - type: custom:entity-progress-card-dev
            name: 75%
            entity: input_number.epb_demo_theme_75
            theme: light
          - type: custom:entity-progress-card-dev
            name: 95%
            entity: input_number.epb_demo_theme_95
            theme: light
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_theme_95
            theme: light
            name: light
            bar_color_mode: rainbow
            icon: mdi:book
            grid_options:
              columns: 12
              rows: 1
      - type: grid
        cards:
          - type: heading
            heading: Same theme, different % (voc)
            heading_style: title
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_voc_hazardous
            theme: voc
            name: voc
            bar_color_mode: segment
            icon: mdi:book
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            name: good
            entity: input_number.epb_demo_voc_good
            theme: voc
            max_value: 5000
          - type: custom:entity-progress-card-dev
            name: moderate
            entity: input_number.epb_demo_voc_moderate
            theme: voc
            max_value: 5000
          - type: custom:entity-progress-card-dev
            name: bad
            entity: input_number.epb_demo_voc_bad
            theme: voc
            max_value: 5000
          - type: custom:entity-progress-card-dev
            name: hazardous
            entity: input_number.epb_demo_voc_hazardous
            theme: voc
            max_value: 5000
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_voc_hazardous
            theme: voc
            name: voc
            bar_color_mode: rainbow
            icon: mdi:book
            grid_options:
              columns: 12
              rows: 1
      - type: grid
        cards:
          - type: heading
            heading: Same theme, different % (critical_when_extreme)
            heading_style: title
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_theme_95
            theme: critical_when_extreme
            name: critical_when_extreme
            bar_color_mode: segment
            icon: mdi:book
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            name: 25%
            entity: input_number.epb_demo_theme_25
            theme: critical_when_extreme
          - type: custom:entity-progress-card-dev
            name: 50%
            entity: input_number.epb_demo_theme_50
            theme: critical_when_extreme
          - type: custom:entity-progress-card-dev
            name: 75%
            entity: input_number.epb_demo_theme_75
            theme: critical_when_extreme
          - type: custom:entity-progress-card-dev
            name: 95%
            entity: input_number.epb_demo_theme_95
            theme: critical_when_extreme
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_theme_95
            theme: critical_when_extreme
            name: critical_when_extreme
            bar_color_mode: rainbow
            icon: mdi:book
            grid_options:
              columns: 12
              rows: 1
      - type: grid
        cards:
          - type: heading
            heading: Same theme, different value (critical_when_extreme_center)
            heading_style: title
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_power
            theme: critical_when_extreme_center
            name: critical_when_extreme_center
            center_zero: true
            min_value: -3000
            max_value: 3000
            bar_color_mode: segment
            icon: mdi:book
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            name: strongly negative
            entity: input_number.epb_demo_power
            theme: critical_when_extreme_center
            center_zero: true
            min_value: -3000
            max_value: 3000
          - type: custom:entity-progress-card-dev
            name: near center
            entity: input_number.epb_demo_power
            theme: critical_when_extreme_center
            center_zero: true
            min_value: -3000
            max_value: 3000
          - type: custom:entity-progress-card-dev
            name: strongly positive
            entity: input_number.epb_demo_power
            theme: critical_when_extreme_center
            center_zero: true
            min_value: -3000
            max_value: 3000
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_power
            theme: critical_when_extreme_center
            name: critical_when_extreme_center
            center_zero: true
            min_value: -3000
            max_value: 3000
            bar_color_mode: rainbow_full
            icon: mdi:book
            grid_options:
              columns: 12
              rows: 1
      - type: grid
        cards:
          - type: heading
            heading: Same theme, different state (battery_adaptive)
            heading_style: title
          - type: custom:entity-progress-card-dev
            entity: sensor.epb_demo_battery_ev
            name: 'battery_adaptive (tap to toggle charging)'
            theme: battery_adaptive
            bar_color_mode: rainbow_full
            icon_animation: battery_charging
            tap_action:
              action: call-service
              service: input_boolean.toggle
              target:
                entity_id: input_boolean.epb_demo_charging
            grid_options:
              columns: 12
              rows: 1
      - type: grid
        cards:
          - type: heading
            heading: Same theme, different % (pm25)
            heading_style: title
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_pm25_hazardous
            theme: pm25
            name: pm25
            bar_color_mode: segment
            icon: mdi:book
            max_value: 200
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            name: good
            entity: input_number.epb_demo_pm25_good
            theme: pm25
            max_value: 200
          - type: custom:entity-progress-card-dev
            name: moderate
            entity: input_number.epb_demo_pm25_moderate
            theme: pm25
            max_value: 200
          - type: custom:entity-progress-card-dev
            name: unhealthy
            entity: input_number.epb_demo_pm25_unhealthy
            theme: pm25
            max_value: 200
          - type: custom:entity-progress-card-dev
            name: hazardous
            entity: input_number.epb_demo_pm25_hazardous
            theme: pm25
            max_value: 200
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_pm25_hazardous
            theme: pm25
            name: pm25
            bar_color_mode: rainbow
            icon: mdi:book
            max_value: 200
            grid_options:
              columns: 12
              rows: 1
      - type: grid
        cards:
          - type: heading
            heading: All watermark types
            heading_style: title
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: blended (default)
            watermark:
              type: blended
              low: 20
              high: 80
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: area
            watermark:
              type: area
              low: 20
              high: 80
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: striped
            watermark:
              type: striped
              opacity: 0.5
              low:
                value: 20
                color: white
              high:
                value: 80
                color: white
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: triangle
            watermark:
              type: triangle
              opacity: 0.5
              low:
                value: 20
                color: white
              high:
                value: 80
                color: white
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: round
            watermark:
              type: round
              low:
                value: 20
                color: red
              high:
                value: 80
                color: green
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: line
            watermark:
              type: line
              low:
                value: 20
                color: red
              high:
                value: 80
                color: green
      - type: grid
        cards:
          - type: heading
            heading: watermark - new low/high shape
            heading_style: title
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'low: false (hidden, replaces disable_low)'
            watermark:
              low: false
              high: 80
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'global type/opacity, high overrides everything'
            watermark:
              type: line
              opacity: 1
              low: 20
              high:
                value: 80
                color: red
                type: round
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'global color cascades to both sides'
            watermark:
              color: orange
              low: 20
              high: 80
      - type: grid
        cards:
          - type: heading
            heading: peak_marker - min/max/average over a time window
            heading_style: title
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'default look (move the slider to build history)'
            peak_marker:
              window: 2h
              min: true
              max: true
              average: true
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'per-mark shorthand + full override mix'
            peak_marker:
              window: 2h
              min: cyan
              max: magenta
              average:
                type: round
                color: yellow
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'top-level type/opacity cascades to min/max'
            peak_marker:
              window: 1d
              type: round
              opacity: 1
              min: true
              max: true
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'range alone - no min/max mark drawn'
            peak_marker:
              window: 2h
              range:
                type: striped
                color: dodgerblue
                opacity: 0.25
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'min/max as zones - what was never reached'
            peak_marker:
              window: 2h
              min:
                type: area
              max:
                type: area
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'range under the three lines'
            peak_marker:
              window: 2h
              range: true
              min: true
              max: true
              average: true
      - type: grid
        cards:
          - type: heading
            heading: trend_indicator - time-windowed mode
            heading_style: title
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'basis: average, colored'
            trend_indicator:
              window: 5min
              basis: average
              colored: true
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'basis: edge, threshold: 5'
            trend_indicator:
              window: 2h
              basis: edge
              threshold: 5
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'basis: slope, explicit per-direction colors'
            trend_indicator:
              window: 1d
              basis: slope
              colored: true
              up_color: green
              down_color: red
              flat_color: grey
      - type: grid
        cards:
          - type: heading
            heading: All bar effects
            heading_style: title
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: radius
            bar_effect:
              - radius
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: glass
            bar_effect:
              - glass
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: gradient
            bar_effect:
              - gradient
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: gradient_reverse
            bar_effect:
              - gradient_reverse
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: shimmer
            bar_effect:
              - shimmer
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: shimmer_reverse
            bar_effect:
              - shimmer_reverse
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: radius + shimmer (combinable)
            bar_effect:
              - radius
              - shimmer
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: wave
            bar_position: background
            bar_orientation: up
            bar_effect:
              - wave
      - type: grid
        cards:
          - type: heading
            heading: All icon animations — start the timer to see them
            heading_style: title
          - type: custom:entity-progress-card-dev
            entity: timer.epb_demo_timer
            name: Timer (start it!)
            tap_action:
              action: call-service
              service: timer.start
              target:
                entity_id: timer.epb_demo_timer
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: timer.epb_demo_timer
            name: spin
            icon_animation: spin
            tap_action:
              action: call-service
              service: timer.start
              target:
                entity_id: timer.epb_demo_timer
          - type: custom:entity-progress-card-dev
            entity: timer.epb_demo_timer
            name: pulse
            icon_animation: pulse
          - type: custom:entity-progress-card-dev
            entity: timer.epb_demo_timer
            name: bounce
            icon_animation: bounce
          - type: custom:entity-progress-card-dev
            entity: timer.epb_demo_timer
            name: shake
            icon_animation: shake
          - type: custom:entity-progress-card-dev
            entity: timer.epb_demo_timer
            name: ping
            icon_animation: ping
          - type: custom:entity-progress-card-dev
            entity: timer.epb_demo_timer
            name: reveal
            icon_animation: reveal
          - type: custom:entity-progress-card-dev
            entity: timer.epb_demo_timer
            icon: mdi:washing-machine
            bar_size: medium
            reverse: true
            unit: flextimer
            name: Remaining Time reverse
            bar_orientation: rtl
            state_content:
              - state
            icon_animation: washing_machine
            grid_options:
              columns: 6
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: sensor.epb_demo_battery_ev
            name: battery_charging (tap to toggle charging)
            icon_animation: battery_charging
            tap_action:
              action: call-service
              service: input_boolean.toggle
              target:
                entity_id: input_boolean.epb_demo_charging
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: icon_animation via Jinja condition (#125)
            icon_animation:
              effect: pulse
              jinja: "{{ states('input_number.epb_demo_battery') | float > 20 }}"
      - type: grid
        cards:
          - type: heading
            heading: bar_color_mode, custom_theme, alert_when, trend
            heading_style: title
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'bar_color_mode: segment (needs a theme)'
            theme: optimal_when_high
            bar_color_mode: segment
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'bar_color_mode: rainbow (needs a theme)'
            theme: optimal_when_high
            bar_color_mode: rainbow
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'bar_color_mode: rainbow_full (always shows the full gradient)'
            theme: optimal_when_high
            bar_color_mode: rainbow_full
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: custom_theme (per-zone colors)
            custom_theme:
              - min: 0
                max: 30
                color: red
              - min: 30
                max: 70
                color: orange
              - min: 70
                max: 100
                color: green
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'status_label: status pill (custom_theme)'
            custom_theme:
              - min: 0
                max: 30
                color: red
              - min: 30
                max: 70
                color: orange
              - min: 70
                max: 100
                color: green
            status_label:
              jinja: >-
                {% set v = states('input_number.epb_demo_battery') | float %}
                {% if v < 30 %}low{% elif v < 70 %}ok{% else %}good{% endif
                %}
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: 'status_label: status pill (built-in theme)'
            theme: temperature
            status_label:
              jinja: >-
                {% set t = states('input_number.epb_demo_temperature') |
                float %} {% if t > 30 %}hot{% elif t < 0 %}cold{% else
                %}ok{% endif %}
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: 'status_label: position left'
            theme: temperature
            status_label:
              position: left
              jinja: >-
                {% set t = states('input_number.epb_demo_temperature') |
                float %} {% if t > 30 %}hot{% elif t < 0 %}cold{% else
                %}ok{% endif %}
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: 'alert_when: above 20 (blink border)'
            alert_when:
              above: 20
              color: red
              highlight: border
              animation: blink
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: 'alert_when: below 25 (static background)'
            alert_when:
              color: red
              highlight: background
              below: 25
              animation: static
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: 'alert_when: below 25 (blink background)'
            alert_when:
              color: red
              highlight: background
              below: 25
              animation: blink
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: 'alert_when: below 25 (ping background)'
            alert_when:
              color: red
              highlight: background
              below: 25
              animation: ping
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: 'alert_when: below 25 (ping border)'
            alert_when:
              color: red
              highlight: border
              below: 25
              animation: ping
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: 'alert_when: below 25 (blink border)'
            alert_when:
              color: red
              highlight: border
              below: 25
              animation: blink
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: 'alert_when: below 25 (static border)'
            alert_when:
              color: red
              highlight: border
              below: 25
              animation: static
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: 'alert_when: below 25 (label)'
            alert_when:
              color: red
              highlight: label
              label: 'LOW'
              below: 25
              animation: blink
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: 'alert_when.jinja: Advanced, plain boolean'
            alert_when:
              jinja: "{{ states('input_number.epb_demo_temperature') | float > 20 }}"
              color: red
              highlight: border
              animation: ping
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: 'alert_when.jinja: Advanced, object with partial override'
            alert_when:
              jinja: >-
                {% set t = states('input_number.epb_demo_temperature') | float
                %} {% if t > 30 %}{{ {'color': 'red', 'animation': 'ping'} }}
                {% elif t > 20 %}{{ {'color': 'orange'} }} {% else %}false{%
                endif %}
              color: red
              animation: static
      - type: grid
        cards:
          - type: heading
            heading: 'custom_theme — use cases'
            heading_style: title
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'custom_theme: color only'
            custom_theme:
              - min: 0
                max: 30
                color: red
              - min: 30
                max: 70
                color: orange
              - min: 70
                max: 100
                color: green
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'custom_theme: color + icon'
            custom_theme:
              - min: 0
                max: 30
                color: red
                icon: mdi:emoticon-sad
              - min: 30
                max: 70
                color: orange
                icon: mdi:emoticon-neutral
              - min: 70
                max: 100
                color: green
                icon: mdi:emoticon-happy
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_hot
            name: custom_theme -20/40
            min_value: -20
            max_value: 40
            bar_color_mode: rainbow
            custom_theme:
              - min: -20
                max: 0
                color: blue
              - min: 0
                max: 20
                color: green
              - min: 20
                max: 40
                color: red
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_negative
            name: 'custom_theme +/-: standard card'
            min_value: -20
            max_value: 40
            bar_color_mode: rainbow
            custom_theme:
              - min: -20
                max: 0
                color: blue
              - min: 0
                max: 20
                color: green
              - min: 20
                max: 40
                color: red
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_negative
            name: 'custom_theme +/-: center_zero (zero = 0)'
            center_zero: true
            min_value: -20
            max_value: 40
            bar_color_mode: rainbow
            custom_theme:
              - min: -20
                max: 0
                color: blue
              - min: 0
                max: 20
                color: green
              - min: 20
                max: 40
                color: red
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_negative
            name: 'custom_theme +/-: center_zero (zero = 20)'
            center_zero:
              value: 20
            min_value: -20
            max_value: 40
            bar_color_mode: rainbow
            custom_theme:
              - min: -20
                max: 0
                color: blue
              - min: 0
                max: 20
                color: green
              - min: 20
                max: 40
                color: red
      - type: grid
        cards:
          - type: heading
            heading: center_zero — every variant
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_power
              center_zero: true            # 50/50 split around 0, or:
              center_zero:
                value: 1000                 # offset the zero point
                growth_percent: true        # arm width = magnitude, not a fixed half-scale
              min_value: -3000
              max_value: 3000
              ```
              Every `center_zero` variant: the default 50/50 split, an
              offset zero point, `growth_percent` sizing, `value_sign` for an
              explicit `+`/`-`, combined with a theme (`segment`/`rainbow`),
              a watermark, `layout: vertical`, and `bar_stack: { mode: net }`
              for a single signed balance from two always-positive entities.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_power
            name: 'center_zero: true (50/50 split)'
            center_zero: true
            min_value: -3000
            max_value: 3000
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_power
            name: 'center_zero + value_sign: true'
            center_zero: true
            min_value: -3000
            max_value: 3000
            value_sign: true
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_power
            name: 'center_zero: {value: 1000} (offset zero point)'
            center_zero:
              value: 1000
            min_value: -3000
            max_value: 3000
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_power
            name: 'center_zero: {growth_percent: true} (arm width = magnitude)'
            center_zero:
              growth_percent: true
            min_value: -3000
            max_value: 3000
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_power
            name: 'center_zero + theme + bar_color_mode: segment'
            center_zero: true
            min_value: -3000
            max_value: 3000
            theme: optimal_when_high
            bar_color_mode: segment
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_power
            name: 'center_zero + theme + bar_color_mode: rainbow'
            center_zero: true
            min_value: -3000
            max_value: 3000
            theme: optimal_when_high
            bar_color_mode: rainbow
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_power
            name: 'center_zero + theme + bar_color_mode: rainbow_full'
            center_zero: true
            min_value: -3000
            max_value: 3000
            theme: optimal_when_high
            bar_color_mode: rainbow_full
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_power
            name: center_zero + watermark
            center_zero: true
            min_value: -3000
            max_value: 3000
            watermark:
              type: line
              low:
                value: -1500
                color: red
              high:
                value: 1500
                color: green
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_power
            name: 'center_zero, layout: vertical'
            center_zero: true
            min_value: -3000
            max_value: 3000
            layout: vertical
            grid_options:
              columns: 4
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_grid_consumption
            name: center_zero + bar_stack (net)
            center_zero: true
            min_value: -3000
            max_value: 3000
            bar_stack:
              mode: net
              entities:
                - entity: input_number.epb_demo_solar_production
                  subtract: true
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_solar_production
            name: 'Energy use case: expense (−) vs production (+)'
            center_zero: true
            min_value: -3000
            max_value: 3000
            bar_stack:
              entities:
                - entity: input_number.epb_demo_grid_consumption
                  subtract: true
                  color: red
      - type: grid
        cards:
          - type: heading
            heading: 'Full rainbow (bar_color_mode: rainbow_full), every bar_size'
            heading_style: title
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: 'Full rainbow: bar_size: xsmall'
            theme: temperature
            bar_color_mode: rainbow_full
            center_zero: true
            bar_size: xsmall
            grid_options:
              columns: 12
              rows: auto
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: 'Full rainbow: bar_size: small'
            theme: temperature
            bar_color_mode: rainbow_full
            center_zero: true
            bar_size: small
            grid_options:
              columns: 12
              rows: auto
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: 'Full rainbow: bar_size: medium'
            theme: temperature
            bar_color_mode: rainbow_full
            center_zero: true
            bar_size: medium
            grid_options:
              columns: 12
              rows: auto
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: 'Full rainbow: bar_size: large'
            theme: temperature
            bar_color_mode: rainbow_full
            center_zero: true
            bar_size: large
            grid_options:
              columns: 12
              rows: auto
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: 'Full rainbow: bar_size: xlarge'
            theme: temperature
            bar_color_mode: rainbow_full
            center_zero: true
            bar_size: xlarge
            grid_options:
              columns: 12
              rows: auto
      - type: grid
        cards:
          - type: heading
            heading: 'Full rainbow showcase - temperatures, layouts, center_zero, labels'
            heading_style: title
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_negative
            name: negative
            theme: temperature
            bar_color_mode: rainbow_full
            center_zero: true
            min_value: -20
            max_value: 40
            status_label:
              jinja: >-
                {% set t = states('input_number.epb_demo_temp_negative') |
                float %} {% if t < -5 %}glacial {% elif t < 5 %}cold {% elif t
                < 15 %}cool {% elif t < 25 %}temperate {% elif t < 32 %}warm
                {% else %}scorching {% endif %}
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_positive
            name: positive
            theme: temperature
            bar_color_mode: rainbow_full
            center_zero: true
            min_value: -20
            max_value: 40
            status_label:
              jinja: >-
                {% set t = states('input_number.epb_demo_temp_positive') |
                float %} {% if t < -5 %}glacial {% elif t < 5 %}cold {% elif t
                < 15 %}cool {% elif t < 25 %}temperate {% elif t < 32 %}warm
                {% else %}scorching {% endif %}
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_temperate
            name: temperate
            theme: temperature
            bar_color_mode: rainbow_full
            max_value: 40
            status_label:
              jinja: >-
                {% set t = states('input_number.epb_demo_temp_temperate') |
                float %} {% if t < -5 %}glacial {% elif t < 5 %}cold {% elif t
                < 15 %}cool {% elif t < 25 %}temperate {% elif t < 32 %}warm
                {% else %}scorching {% endif %}
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_hot
            name: hot
            theme: temperature
            bar_color_mode: rainbow_full
            max_value: 40
            status_label:
              jinja: >-
                {% set t = states('input_number.epb_demo_temp_hot') | float %}
                {% if t < -5 %}glacial {% elif t < 5 %}cold {% elif t < 15
                %}cool {% elif t < 25 %}temperate {% elif t < 32 %}warm {%
                else %}scorching {% endif %}
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_negative
            name: 'negative, layout: vertical'
            layout: vertical
            theme: temperature
            bar_color_mode: rainbow_full
            center_zero: true
            min_value: -20
            max_value: 40
            grid_options:
              columns: 4
              rows: 2
            status_label:
              jinja: >-
                {% set t = states('input_number.epb_demo_temp_negative') |
                float %} {% if t < -5 %}glacial {% elif t < 5 %}cold {% elif t
                < 15 %}cool {% elif t < 25 %}temperate {% elif t < 32 %}warm
                {% else %}scorching {% endif %}
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_positive
            name: 'positive, layout: vertical'
            layout: vertical
            theme: temperature
            bar_color_mode: rainbow_full
            grid_options:
              columns: 4
              rows: 2
            status_label:
              jinja: >-
                {% set t = states('input_number.epb_demo_temp_positive') |
                float %} {% if t < -5 %}glacial {% elif t < 5 %}cold {% elif t
                < 15 %}cool {% elif t < 25 %}temperate {% elif t < 32 %}warm
                {% else %}scorching {% endif %}
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_temperate
            name: 'temperate, layout: vertical, center_zero'
            layout: vertical
            theme: temperature
            bar_color_mode: rainbow_full
            center_zero: true
            min_value: -20
            max_value: 40
            grid_options:
              columns: 4
              rows: 2
            status_label:
              jinja: >-
                {% set t = states('input_number.epb_demo_temp_temperate') |
                float %} {% if t < -5 %}glacial {% elif t < 5 %}cold {% elif t
                < 15 %}cool {% elif t < 25 %}temperate {% elif t < 32 %}warm
                {% else %}scorching {% endif %}
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_hot
            name: 'hot, layout: vertical'
            layout: vertical
            theme: temperature
            bar_color_mode: rainbow_full
            max_value: 40
            grid_options:
              columns: 4
              rows: 2
            status_label:
              jinja: >-
                {% set t = states('input_number.epb_demo_temp_hot') | float %}
                {% if t < -5 %}glacial {% elif t < 5 %}cold {% elif t < 15
                %}cool {% elif t < 25 %}temperate {% elif t < 32 %}warm {%
                else %}scorching {% endif %}
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_hot
            name: 'hot, bar_orientation: up (true vertical bar)'
            layout: vertical
            bar_orientation: up
            bar_position: overlay
            theme: temperature
            bar_color_mode: rainbow_full
            max_value: 40
            grid_options:
              columns: 4
              rows: 2
            status_label:
              jinja: >-
                {% set t = states('input_number.epb_demo_temp_hot') | float %}
                {% if t < -5 %}glacial {% elif t < 5 %}cold {% elif t < 15
                %}cool {% elif t < 25 %}temperate {% elif t < 32 %}warm {%
                else %}scorching {% endif %}
      - type: grid
        cards:
          - type: heading
            heading: More styling
            heading_style: title
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'bar_segments: 10'
            bar_segments: 10
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'bar_max_width: 80px'
            bar_max_width: 80px
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'bar_orientation: rtl'
            bar_orientation: rtl
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: force_circular_background
            force_circular_background: true
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_power
            name: 'center_zero: {value, growth_percent}'
            center_zero:
              value: 0
              growth_percent: true
            min_value: -3000
            max_value: 3000
    show_icon_and_title: true
    cards: []
  - title: EP Demo - Layout & bar_position
    icon: mdi:flask-outline
    path: epb-layout
    type: sections
    max_columns: 2
    sections:
      - type: grid
        cards:
          - type: heading
            heading: 'layout: horizontal — every bar_position'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              layout: horizontal
              bar_position: default   # default | below | compact_below | top | bottom | overlay | background
              ```
              Same entity, only `bar_position` changes below - where the
              progress bar sits relative to the name/value text.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: default
            layout: horizontal
            bar_position: default
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: below
            layout: horizontal
            bar_position: below
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'compact_below (#123)'
            layout: horizontal
            bar_position: compact_below
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: top
            layout: horizontal
            bar_position: top
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: bottom
            layout: horizontal
            bar_position: bottom
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: overlay
            layout: horizontal
            bar_position: overlay
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: background
            layout: horizontal
            bar_position: background
      - type: grid
        cards:
          - type: heading
            heading: 'layout: vertical — every bar_position'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              layout: vertical
              bar_position: default   # default | below | compact_below | top | bottom | overlay | background
              ```
              Same as the horizontal set above, but `layout: vertical` -
              every `bar_position` still applies, just along the other axis.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: default
            layout: vertical
            bar_position: default
            grid_options:
              columns: 4
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: below
            layout: vertical
            bar_position: below
            grid_options:
              columns: 4
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: top
            layout: vertical
            bar_position: top
            grid_options:
              columns: 4
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: bottom
            layout: vertical
            bar_position: bottom
            grid_options:
              columns: 4
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: overlay
            layout: vertical
            bar_position: overlay
            force_circular_background: true
            grid_options:
              columns: 4
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: background
            layout: vertical
            bar_position: background
            grid_options:
              columns: 4
              rows: 2
      - type: grid
        cards:
          - type: heading
            heading: 'bar_orientation: up — only valid on overlay/background'
            heading_style: title
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_printer_ink_black
            layout: vertical
            bar_position: overlay
            bar_orientation: up
            color: black
            bar_color: black
            hide:
              - name
            grid_options:
              columns: 3
              rows: 4
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_printer_ink_cyan
            layout: vertical
            bar_position: overlay
            bar_orientation: up
            color: cyan
            bar_color: cyan
            hide:
              - name
            grid_options:
              columns: 3
              rows: 4
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_printer_ink_magenta
            layout: vertical
            bar_position: overlay
            bar_orientation: up
            color: magenta
            bar_color: magenta
            hide:
              - name
            grid_options:
              columns: 3
              rows: 4
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_printer_ink_yellow
            layout: vertical
            bar_position: overlay
            bar_orientation: up
            color: yellow
            bar_color: yellow
            hide:
              - name
            grid_options:
              columns: 3
              rows: 4
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: horizontal + background + up
            layout: horizontal
            bar_position: background
            bar_orientation: up
            grid_options:
              columns: 12
              rows: 2
        column_span: 2
      - type: grid
        cards:
          - type: heading
            heading: Série 1 — horizontal, hide progressif (secondary → icon → name)
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              layout: horizontal
              hide: [secondary_info]   # then + icon, then + name below
              ```
              `hide` items strip progressively: standard, then without
              `secondary_info`, then also without `icon`, then also without
              `name` (bar only) - see how the card reclaims the freed-up
              space at each step.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: Standard
            layout: horizontal
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '- secondary_info'
            layout: horizontal
            hide:
              - secondary_info
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '- secondary_info - icon'
            layout: horizontal
            hide:
              - secondary_info
              - icon
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '- secondary_info - icon - name'
            layout: horizontal
            hide:
              - secondary_info
              - icon
              - name
        column_span: 2
      - type: grid
        cards:
          - type: heading
            heading: 'Série 2 — compact_below, hide progressif (#123)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              layout: horizontal
              bar_position: compact_below
              hide: [icon]   # then + unit, then + secondary_info, then + name
              ```
              Same idea as Série 1, with `bar_position: compact_below`: name
              and value share one row, `hide` items strip progressively from
              there.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: Standard
            layout: horizontal
            bar_position: compact_below
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '- icon'
            layout: horizontal
            bar_position: compact_below
            hide:
              - icon
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '- icon - unit'
            unit: '%'
            layout: horizontal
            bar_position: compact_below
            hide:
              - icon
              - unit
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '- icon - secondary_info'
            layout: horizontal
            bar_position: compact_below
            hide:
              - icon
              - secondary_info
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '- icon - name'
            layout: horizontal
            bar_position: compact_below
            hide:
              - icon
              - name
        column_span: 2
      - type: grid
        cards:
          - type: heading
            heading: Série 3 — vertical, hide progressif (secondary → icon → name)
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              layout: vertical
              hide: [secondary_info]   # then + icon, then + name below
              ```
              Same progressive `hide` sequence as the horizontal set above,
              with `layout: vertical`.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: Standard
            layout: vertical
            grid_options:
              columns: 3
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '- secondary_info'
            layout: vertical
            hide:
              - secondary_info
            grid_options:
              columns: 3
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '- secondary_info - icon'
            layout: vertical
            hide:
              - secondary_info
              - icon
            grid_options:
              columns: 3
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '- secondary_info - icon - name'
            layout: vertical
            hide:
              - secondary_info
              - icon
              - name
            grid_options:
              columns: 3
              rows: 2
        column_span: 2
      - type: grid
        cards:
          - type: heading
            heading: 'hide: Jinja template (dynamic)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              hide: >
                {% if is_state('input_boolean.epb_demo_simple_mode', 'on') %}
                  secondary_info, progress_bar
                {% endif %}
              ```
              `hide` also accepts a Jinja template returning a list, instead
              of a static list - toggle the helper below to hide
              `secondary_info` and `progress_bar` on the fly.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'hide: {{ jinja }}'
            layout: horizontal
            hide: >
              {% if is_state('input_boolean.epb_demo_simple_mode', 'on') %}
                secondary_info, progress_bar
              {% endif %}
          - type: tile
            entity: input_boolean.epb_demo_simple_mode
            name: Toggle to hide secondary_info + progress_bar
            tap_action:
              action: toggle
      - type: grid
        cards:
          - type: heading
            heading: Série 4 — horizontal, bar_size xsmall → xlarge
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              layout: horizontal
              bar_size: medium   # xsmall | small | medium | large | xlarge
              ```
              Every `bar_size` step, `layout: horizontal`, default
              `bar_position`.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: xsmall
            layout: horizontal
            bar_size: xsmall
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: small
            layout: horizontal
            bar_size: small
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: xlarge
            layout: horizontal
            bar_size: xlarge
            grid_options:
              columns: 6
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: medium
            layout: horizontal
            bar_size: medium
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: large
            layout: horizontal
            bar_size: large
        column_span: 2
      - type: grid
        cards:
          - type: heading
            heading: >-
              Série 5 — horizontal, bar_position: below, bar_size xsmall →
              xlarge
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              layout: horizontal
              bar_position: below
              bar_size: medium   # xsmall | small | medium | large | xlarge
              ```
              Same `bar_size` sweep as Série 4, with `bar_position: below`
              instead of the default - the bar drops to its own row under
              the text instead of sharing one with it.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: xsmall
            layout: horizontal
            bar_position: below
            bar_size: xsmall
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: small
            layout: horizontal
            bar_position: below
            bar_size: small
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: medium
            layout: horizontal
            bar_position: below
            bar_size: medium
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: large
            layout: horizontal
            bar_position: below
            bar_size: large
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: xlarge
            layout: horizontal
            bar_position: below
            bar_size: xlarge
        column_span: 2
      - type: grid
        cards:
          - type: heading
            heading: Série 6 — vertical, bar_size xsmall → xlarge
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              layout: vertical
              bar_size: medium   # xsmall | small | medium | large | xlarge
              ```
              Same `bar_size` sweep, `layout: vertical` - shown at two
              different row heights (2 vs 3 rows) to see how each size
              adapts to the extra space.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: xsmall
            layout: vertical
            bar_size: xsmall
            grid_options:
              columns: 6
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: small
            layout: vertical
            bar_size: small
            grid_options:
              columns: 6
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: xsmall
            layout: vertical
            bar_size: xsmall
            grid_options:
              columns: 3
              rows: 3
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: small
            layout: vertical
            bar_size: small
            grid_options:
              columns: 3
              rows: 3
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: medium
            layout: vertical
            bar_size: medium
            grid_options:
              columns: 3
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: large
            layout: vertical
            bar_size: large
            grid_options:
              columns: 3
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: xlarge
            layout: vertical
            bar_size: xlarge
            grid_options:
              columns: 6
              rows: 2
        column_span: 2
      - type: grid
        cards:
          - type: heading
            heading: 'Série 7 — vertical, bar_position: below, bar_size xsmall → xlarge'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              layout: vertical
              bar_position: below
              bar_size: medium   # xsmall | small | medium | large | xlarge
              ```
              Same `bar_size` sweep as Série 6, with `bar_position: below`
              instead of the default.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: xsmall
            layout: vertical
            bar_position: below
            bar_size: xsmall
            grid_options:
              columns: 6
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: small
            layout: vertical
            bar_position: below
            bar_size: small
            grid_options:
              columns: 6
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: xsmall
            layout: vertical
            bar_position: below
            bar_size: xsmall
            grid_options:
              columns: 3
              rows: 3
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: small
            layout: vertical
            bar_position: below
            bar_size: small
            grid_options:
              columns: 3
              rows: 3
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: medium
            layout: vertical
            bar_position: below
            bar_size: medium
            grid_options:
              columns: 3
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: large
            layout: vertical
            bar_position: below
            bar_size: large
            grid_options:
              columns: 3
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: xlarge
            layout: vertical
            bar_position: below
            bar_size: xlarge
            grid_options:
              columns: 6
              rows: 2
        column_span: 2
      - type: grid
        cards:
          - type: heading
            heading: 'density: compact — smallest useful footprint (#134)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              density: compact
              ```
              A preset for the smallest useful card footprint, for whichever
              `layout` is already set: horizontal narrows the column (text
              still shown); vertical has no matching narrow shape, so
              `name`/`secondary_info` are forced hidden instead, down to a
              single grid row. Either way `bar_position` is restricted to
              `top`/`bottom`/`background`/`icon`, and `multiline` cleared for you
              (editor included - fields stop being offered instead of
              silently reverting on save). `status_label`/`trend_indicator`
              still work as usual. Cards below have no `grid_options` of
              their own, so their default Sections size shrinks with them -
              no manual resize needed. Toggling `compact` on through the
              visual editor (instead of writing YAML directly, like here)
              goes one step further and pins `grid_options` outright, since
              that's the only way to actually resize a card that's already
              placed.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: not compact
            layout: vertical
            bar_position: overlay
            status_label:
              jinja: standard
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: not compact
            layout: horizontal
            status_label:
              jinja: standard
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: density compact
            density: compact
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'compact + bottom'
            density: compact
            bar_position: bottom
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'compact + background'
            density: compact
            bar_position: background
            color: white
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'compact + icon'
            density: compact
            bar_position: icon
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'compact + status_label'
            density: compact
            bar_position: bottom
            status_label:
              jinja: standard
            hide:
              - secondary_info
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'compact + vertical (#139)'
            density: compact
            layout: vertical
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'compact + vertical + bottom'
            density: compact
            layout: vertical
            bar_position: bottom
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'compact + vertical + background'
            density: compact
            layout: vertical
            bar_position: background
            color: white
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'compact + vertical + icon'
            density: compact
            layout: vertical
            bar_position: icon
        column_span: 2
      - type: grid
        cards:
          - type: heading
            heading: 'density: single_line — icon, name, secondary and bar on one row'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              density: single_line
              ```
              The other density preset: instead of trimming the card down,
              it lays the four parts out as siblings on a single row - the
              bar takes whatever width the rest leaves. `layout` is forced
              to `horizontal` and `bar_position` back to `default` (the bar
              lives in the row itself, not in a `top`/`bottom`/`background`
              container), `multiline` cleared. Unlike `compact`, nothing is
              forced under `hide`: trim the row down to whatever you want,
              a bar on its own included. `grid_options` is left alone too -
              `layout: horizontal` already resolves to one grid row.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: single_line
            density: single_line
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '+ small bar'
            bar_size: small
            density: single_line
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '+ no name'
            hide:
              - name
            density: single_line
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '+ no icon'
            hide:
              - icon
            density: single_line
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '+ no secondary_info'
            hide:
              - secondary_info
            density: single_line
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '+ bar only'
            bar_size: small
            hide:
              - icon
              - name
              - secondary_info
            density: single_line
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '+ status_label'
            status_label:
              jinja: standard
            hide:
              - secondary_info
            density: single_line
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '+ watermark'
            watermark:
              low: 20
              high: 80
            density: single_line
            grid_options:
              columns: 12
              rows: 1
        column_span: 2
      - type: grid
        cards:
          - type: heading
            heading: 'density: single_column — icon, texts and an upright bar in one column'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card
              entity: input_number.epb_demo_battery
              density: single_column
              ```
              The vertical twin of `single_line`: `layout` is forced to
              `vertical`, the bar stands upright under the texts
              (`bar_position: default`) or behind them (`overlay`),
              filling from the bottom (`up`) or the top (`down`).
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'single_column'
            density: single_column
            grid_options:
              columns: 3
              rows: 3
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '+ down'
            density: single_column
            bar_orientation: down
            grid_options:
              columns: 3
              rows: 3
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '+ overlay'
            density: single_column
            bar_position: overlay
            grid_options:
              columns: 3
              rows: 3
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '+ watermark'
            density: single_column
            watermark:
              low: 20
              high: 80
            grid_options:
              columns: 3
              rows: 3
        column_span: 2
      - type: grid
        cards:
          - type: heading
            heading: 'content_order — place each text and the bar on a line'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card
              entity: input_number.epb_demo_battery
              custom_info: Door
              content_order:
                - [info, value]
                - [name, bar]
              ```
              A list of lines of `name`, `name_info`, `info`,
              `state_content`, `value` and `bar`. Left-out blocks join
              their host; `hide` removes one. Vertical stacks the lines
              (the card grows a row with them), `compact_below` orders the
              line over the bar, `single_line` the one row.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 3
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'horizontal'
            custom_info: Door
            content_order:
              - [info, value]
              - [name, bar]
            grid_options:
              columns: 12
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'vertical'
            layout: vertical
            custom_info: Door
            content_order:
              - [name]
              - [info]
              - [value]
              - [bar]
            grid_options:
              columns: 6
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'compact_below'
            bar_position: compact_below
            content_order:
              - [value, name]
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'single_line'
            density: single_line
            content_order:
              - [value, bar, name]
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'name_info'
            name_info: shown
            content_order:
              - [name_info, name]
              - [value, bar]
            grid_options:
              columns: 6
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'name_info hidden'
            name_info: shown
            hide:
              - name_info
            content_order:
              - [name_info, name]
              - [value, bar]
            grid_options:
              columns: 6
        column_span: 2
      - type: grid
        cards:
          - type: heading
            heading: 'bar_position: icon — a ring around the icon'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card
              entity: sensor.epb_demo_battery_ev
              bar_position: icon
              ```
              The bar becomes a ring round the icon: `bar_size` sets its
              thickness (`xlarge` adds no row), `bar_orientation: rtl` turns
              it the other way, and it takes the theme zones and the marks.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: sensor.epb_demo_battery_ev
            name: plain
            bar_position: icon
            grid_options:
              columns: 6
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: sensor.epb_demo_battery_ev
            name: 'bar_size: xlarge'
            bar_size: xlarge
            bar_position: icon
            grid_options:
              columns: 6
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: sensor.epb_demo_battery_ev
            name: 'theme + segment'
            theme: optimal_when_high
            bar_color_mode: segment
            bar_position: icon
            grid_options:
              columns: 6
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: sensor.epb_demo_battery_ev
            name: rainbow_full
            theme: optimal_when_high
            bar_color_mode: rainbow_full
            bar_position: icon
            grid_options:
              columns: 6
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: sensor.epb_demo_battery_ev
            name: '+ watermark'
            watermark:
              low: 20
              high: 80
              type: line
            bar_position: icon
            grid_options:
              columns: 6
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: sensor.epb_demo_battery_ev
            name: 'rtl, vertical'
            bar_orientation: rtl
            layout: vertical
            bar_position: icon
            grid_options:
              columns: 6
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: sensor.epb_demo_battery_ev
            name: 'bar_ring.softness: 0'
            bar_size: xlarge
            bar_position: icon
            bar_ring:
              softness: 0
            grid_options:
              columns: 6
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: sensor.epb_demo_battery_ev
            name: 'bar_ring.softness: 4'
            bar_size: xlarge
            bar_position: icon
            bar_ring:
              softness: 4
            grid_options:
              columns: 6
              rows: 1
        column_span: 2
    badges:
      - type: custom:entity-progress-badge-dev
        entity: sensor.epb_demo_battery_ev
        name: Ring
        bar_position: icon
      - type: custom:entity-progress-badge-dev
        entity: sensor.epb_demo_battery_ev
        name: Ring zones
        bar_position: icon
        theme: optimal_when_high
        bar_color_mode: rainbow_full
    show_icon_and_title: true
    cards: []
  - title: EP Demo - Aggregation & card_mod
    icon: mdi:flask-outline
    path: epb-aggregation
    type: sections
    max_columns: 2
    sections:
      - type: grid
        cards:
          - type: heading
            heading: '-feature / -multi-feature'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: tile
              entity: sensor.sun_next_midnight
              features:
                - type: custom:entity-progress-feature-dev
                  entity: input_number.epb_demo_printer_ink_cyan
                  bar_size: xlarge
              ```
              A plain `entity-progress-feature` is a bare bar attached to a
              Tile card's own row - no frame, no name/value of its own
              (that's the Tile's job). `entity-progress-multi-feature`
              stacks several of these into one row (see below);
              `entity-progress-multi-card` does the same as a standalone
              card instead.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: tile
            entity: sensor.sun_next_midnight
            features:
              - type: custom:entity-progress-feature-dev
                entity: input_number.epb_demo_printer_ink_cyan
                bar_size: xlarge
                bar_effect: shimmer
                watermark:
                  type: striped
                  opacity: 0.4
                  low:
                    value: 20
                    color: white
                  high:
                    value: 80
                    color: white
            grid_options:
              columns: 12
              rows: 2
          - type: tile
            grid_options:
              min_columns: 4
              columns: 6
              rows: 2
            entity: input_boolean.epb_demo_printer
            name: 'Printer ink levels - bar only'
            features:
              - type: custom:entity-progress-multi-feature-dev
                hide:
                  - icon
                  - name
                  - value
                bar_size: xsmall
                entities:
                  - entity: input_number.epb_demo_printer_ink_black
                    bar_color: black
                  - entity: input_number.epb_demo_printer_ink_cyan
                    bar_color: cyan
                  - entity: input_number.epb_demo_printer_ink_magenta
                    bar_color: magenta
                  - entity: input_number.epb_demo_printer_ink_yellow
                    bar_color: yellow
          - type: tile
            grid_options:
              min_columns: 4
              columns: 6
              rows: 2
            entity: input_boolean.epb_demo_printer
            name: 'Printer ink levels - bar + value'
            features:
              - type: custom:entity-progress-multi-feature-dev
                hide:
                  - icon
                  - name
                bar_size: xsmall
                entities:
                  - entity: input_number.epb_demo_printer_ink_black
                    bar_color: black
                  - entity: input_number.epb_demo_printer_ink_cyan
                    bar_color: cyan
                  - entity: input_number.epb_demo_printer_ink_magenta
                    bar_color: magenta
                  - entity: input_number.epb_demo_printer_ink_yellow
                    bar_color: yellow
          - type: heading
            heading: 'Printer ink levels - standalone entity-progress-multi-card'
            heading_style: subtitle
            grid_options:
              columns: full
          - type: custom:entity-progress-multi-card-dev
            hide:
              - icon
              - name
            bar_size: xsmall
            entities:
              - entity: input_number.epb_demo_printer_ink_black
                bar_color: black
              - entity: input_number.epb_demo_printer_ink_cyan
                bar_color: cyan
              - entity: input_number.epb_demo_printer_ink_magenta
                bar_color: magenta
              - entity: input_number.epb_demo_printer_ink_yellow
                bar_color: yellow
            grid_options:
              min_columns: 4
              columns: 6
              rows: 2
          - type: tile
            grid_options:
              min_columns: 4
              columns: 6
              rows: 2
            entity: sensor.epb_demo_energy_net
            icon: mdi:transmission-tower
            name: 'Energy - bar only'
            features:
              - type: custom:entity-progress-multi-feature-dev
                hide:
                  - icon
                  - name
                  - value
                bar_size: medium
                entities:
                  - entity: input_number.epb_demo_grid_consumption
                    bar_color: blue
                    max_value: 3000
                  - entity: input_number.epb_demo_solar_production
                    bar_color: green
                    max_value: 3000
          - type: tile
            entity: sensor.epb_demo_energy_net
            icon: mdi:transmission-tower
            name: Energy (consumption vs production)
            features:
              - type: custom:entity-progress-multi-feature-dev
                hide:
                  - icon
                  - name
                bar_size: medium
                decimal: 0
                entities:
                  - entity: input_number.epb_demo_grid_consumption
                    bar_color: blue
                    max_value: 3000
                  - entity: input_number.epb_demo_solar_production
                    bar_color: green
                    max_value: 3000
              - type: custom:entity-progress-feature-dev
                entity: input_number.epb_demo_solar_production
                center_zero: true
                min_value: -3000
                max_value: 3000
                bar_color: green
                bar_stack:
                  mode: net
                  entities:
                    - entity: input_number.epb_demo_grid_consumption
                      subtract: true
                      color: blue
            grid_options:
              min_columns: 4
              columns: 6
              rows: 2
          - type: heading
            heading: 'content_order - each row ordered like a single_line card'
            heading_style: subtitle
            grid_options:
              columns: full
          - type: custom:entity-progress-multi-card-dev
            content_order:
              - [value, name, bar]
            hide: []
            bar_size: xsmall
            entities:
              - entity: input_number.epb_demo_printer_ink_black
                bar_color: black
              - entity: input_number.epb_demo_printer_ink_cyan
                bar_color: cyan
            grid_options:
              columns: 12
              rows: 2
          - type: heading
            heading: 'layout: vertical - the rows become columns'
            heading_style: subtitle
            grid_options:
              columns: full
          - type: custom:entity-progress-multi-card-dev
            layout: vertical
            hide: []
            entities:
              - entity: input_number.epb_demo_printer_ink_black
                bar_color: black
              - entity: input_number.epb_demo_printer_ink_cyan
                bar_color: cyan
              - entity: input_number.epb_demo_printer_ink_magenta
                bar_color: magenta
              - entity: input_number.epb_demo_printer_ink_yellow
                bar_color: yellow
            grid_options:
              columns: 6
          - type: custom:entity-progress-multi-card-dev
            layout: vertical
            hide: []
            bar_position: overlay
            entities:
              - entity: input_number.epb_demo_printer_ink_black
                bar_color: black
              - entity: input_number.epb_demo_printer_ink_cyan
                bar_color: cyan
              - entity: input_number.epb_demo_printer_ink_magenta
                bar_color: magenta
              - entity: input_number.epb_demo_printer_ink_yellow
                bar_color: yellow
            grid_options:
              columns: 6
      - type: grid
        cards:
          - type: heading
            heading: 'Native containers — entities'
            heading_style: title
          - type: entities
            title: entities
            entities:
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_battery
                layout: horizontal
                bar_size: small
              - entity: sensor.sun_next_setting
          - type: heading
            heading: Height tests
            heading_style: subtitle
          - type: entities
            title: entities
            entities:
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_battery
                layout: horizontal
                bar_size: small
              - entity: sensor.sun_next_setting
                secondary_info: last-updated
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_battery
                layout: horizontal
                bar_size: small
                bar_position: compact_below
                hide:
                  - progress_bar
                  - secondary_info
                  - unit
                  - value
              - entity: sensor.sun_next_setting
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_battery
                name: 100px
                layout: horizontal
                bar_size: small
                height: 100px
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_battery
                name: 35px
                layout: horizontal
                bar_size: small
                height: 35px
      - type: grid
        cards:
          - type: heading
            heading: 'Native containers — grid'
            heading_style: title
          - square: false
            type: grid
            cards:
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_printer_ink_black
                custom_info: ↓
                bar_color: black
                hide:
                  - name
                  - icon
                marginless: true
                frameless: true
                height: auto
                decimal: 0
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_printer_ink_cyan
                custom_info: ↓
                bar_color: cyan
                hide:
                  - name
                  - icon
                marginless: true
                frameless: true
                height: auto
                decimal: 0
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_printer_ink_magenta
                custom_info: ↓
                bar_color: magenta
                hide:
                  - name
                  - icon
                marginless: true
                frameless: true
                height: auto
                decimal: 0
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_printer_ink_yellow
                custom_info: ↓
                bar_color: yellow
                hide:
                  - name
                  - icon
                marginless: true
                frameless: true
                height: auto
                decimal: 0
            grid_options:
              columns: full
              rows: auto
            columns: 2
            title: Grid Card
          - type: heading
            heading: 'Height tests (8px / 15px / auto / 50px) — square: false, explicit height wins outright'
            heading_style: subtitle
          - square: false
            type: grid
            cards:
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_printer_ink_black
                custom_info: ↓
                bar_color: black
                hide:
                  - name
                  - icon
                marginless: true
                frameless: true
                height: 8px
                decimal: 0
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_printer_ink_cyan
                custom_info: ↓
                bar_color: cyan
                hide:
                  - name
                  - icon
                marginless: true
                frameless: true
                height: 15px
                decimal: 0
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_printer_ink_magenta
                custom_info: ↓
                bar_color: magenta
                hide:
                  - name
                  - icon
                marginless: true
                frameless: true
                height: auto
                decimal: 0
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_printer_ink_yellow
                custom_info: ↓
                bar_color: yellow
                hide:
                  - name
                  - icon
                marginless: true
                frameless: true
                height: 50px
                decimal: 0
            grid_options:
              columns: full
              rows: auto
            columns: 2
            title: Grid Card
      - type: grid
        cards:
          - type: heading
            heading: Horizontal stack card
            heading_style: title
          - type: horizontal-stack
            cards:
              - type: tile
                entity: input_number.epb_demo_battery
                name: Tile
                vertical: false
                features_position: bottom
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_battery
                layout: horizontal
                bar_size: small
                frameless: false
            title: Horizontal stack
          - type: horizontal-stack
            cards:
              - type: tile
                entity: input_number.epb_demo_battery
                name: Tile
                vertical: false
                features_position: bottom
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_battery
                layout: horizontal
                bar_size: small
                frameless: true
            title: Horizontal stack + frameless
          - type: heading
            heading: Height tests
            heading_style: subtitle
          - type: horizontal-stack
            cards:
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_battery
                name: default (no height)
                layout: horizontal
                bar_size: small
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_battery
                name: 100px
                layout: horizontal
                bar_size: small
                height: 100px
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_battery
                name: 35px
                layout: horizontal
                bar_size: small
                height: 35px
      - type: grid
        cards:
          - type: heading
            heading: Vertical stack
            heading_style: title
          - type: vertical-stack
            cards:
              - type: tile
                entity: input_number.epb_demo_battery
                name: Tile
                vertical: false
                features_position: bottom
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_battery
                layout: horizontal
                bar_size: small
            title: Vertical stack
          - type: vertical-stack
            cards:
              - type: tile
                entity: input_number.epb_demo_battery
                name: Tile
                vertical: false
                features_position: bottom
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_battery
                layout: horizontal
                bar_size: small
                frameless: true
            title: Vertical stack + frameless
          - type: heading
            heading: Height tests
            heading_style: subtitle
          - type: vertical-stack
            cards:
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_battery
                name: default (no height)
                layout: horizontal
                bar_size: small
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_battery
                name: 100px
                layout: horizontal
                bar_size: small
                height: 100px
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_battery
                name: 35px
                layout: horizontal
                bar_size: small
                height: 35px
      - type: grid
        cards:
          - type: heading
            heading: Vertical stack in card
            heading_style: title
          - type: custom:vertical-stack-in-card
            title: vertical-stack-in-card
            cards:
              - type: tile
                entity: input_number.epb_demo_battery
                name: Tile example
                vertical: false
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_battery
                layout: horizontal
                bar_size: small
          - type: heading
            heading: Height tests
            heading_style: subtitle
          - type: custom:vertical-stack-in-card
            title: vertical-stack-in-card
            cards:
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_battery
                name: default (no height)
                layout: horizontal
                bar_size: small
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_battery
                name: 100px
                layout: horizontal
                bar_size: small
                height: 100px
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_battery
                name: 35px
                layout: horizontal
                bar_size: small
                height: 35px
      - type: grid
        cards:
          - type: heading
            heading: Layout Card
            heading_style: title
          - type: custom:layout-card
            layout_type: masonry
            cards:
              - type: tile
                entity: input_number.epb_demo_battery
                name: Tile example
                vertical: false
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_battery
                layout: horizontal
                bar_size: small
          - type: heading
            heading: Height tests
            heading_style: subtitle
          - type: custom:layout-card
            layout_type: masonry
            cards:
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_battery
                name: default (no height)
                layout: horizontal
                bar_size: small
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_battery
                name: 100px
                layout: horizontal
                bar_size: small
                height: 100px
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_battery
                name: 35px
                layout: horizontal
                bar_size: small
                height: 35px
      - type: grid
        cards:
          - type: heading
            heading: Embedded in custom:button-card (needs the HACS plugin)
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:button-card
              entity: input_number.epb_demo_battery
              show_name: true
              show_state: false
              show_icon: false
              custom_fields:
                progress:
                  card:
                    type: custom:entity-progress-card-dev
                    entity: input_number.epb_demo_battery
                    height: auto
                    marginless: true
                    frameless: true
              ```
              Recipe from the Theme Guide's "Embedded in another card" section:
              `height: auto` + `marginless: true` + `frameless: true` shrinks
              the card fully to its content instead of stretching to whatever
              height the field's wrapper gives it.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:button-card
            entity: input_number.epb_demo_battery
            show_name: true
            show_state: false
            show_icon: false
            custom_fields:
              progress:
                card:
                  type: custom:entity-progress-card-dev
                  entity: input_number.epb_demo_battery
                  height: auto
                  marginless: true
                  frameless: true
          - type: heading
            heading: Height tests
            heading_style: subtitle
          - type: horizontal-stack
            cards:
              - type: custom:button-card
                entity: input_number.epb_demo_battery
                name: default (no height)
                show_name: true
                show_state: false
                show_icon: false
                custom_fields:
                  progress:
                    card:
                      type: custom:entity-progress-card-dev
                      entity: input_number.epb_demo_battery
                      layout: horizontal
                      bar_size: small
                      marginless: true
                      frameless: true
              - type: custom:button-card
                entity: input_number.epb_demo_battery
                name: 100px
                show_name: true
                show_state: false
                show_icon: false
                custom_fields:
                  progress:
                    card:
                      type: custom:entity-progress-card-dev
                      entity: input_number.epb_demo_battery
                      layout: horizontal
                      bar_size: small
                      marginless: true
                      frameless: true
                      height: 100px
              - type: custom:button-card
                entity: input_number.epb_demo_battery
                name: 35px
                show_name: true
                show_state: false
                show_icon: false
                custom_fields:
                  progress:
                    card:
                      type: custom:entity-progress-card-dev
                      entity: input_number.epb_demo_battery
                      layout: horizontal
                      bar_size: small
                      marginless: true
                      frameless: true
                      height: 35px
      - type: grid
        cards:
          - type: heading
            heading: 'External combined-card + Mushroom — compact_below (#123, @davidcoulson)'
            heading_style: title
          # Prerequisites:
          #  - custom:combined-card (HACS custom repo, category "Dashboard"):
          #    https://github.com/catdad-experiments/ha-utility-cards
          #    - search "Catdad Utility Cards" after adding the repo.
          #    - merges the 3 stacked cards below into one seamless <ha-card>
          #      (no nested borders/shadows), without losing the visual editor.
          #  - custom:mushroom-entity-card (default HACS): piitaya/lovelace-mushroom
          #  - card_mod (default HACS): thomasloven/lovelace-card-mod
          #  - stands in for a real Litter-Robot integration entity with the
          #    epb_demo_litter_* helpers from demo-dashboard-helpers.yaml -
          #    swap for your own sensor.litter_robot_* entities in a real setup.
          #
          # What it demonstrates: bar_position: compact_below (#123) on two
          # frameless/marginless bars sharing one visually combined card with a
          # Mushroom entity row - each bar's own bar_color Jinja recolors the
          # fill red past a threshold (litter level low / waste drawer full),
          # the outer combined-card's card_mod drops its background entirely
          # (blends with the section instead of fighting it in dark mode) and
          # borders with var(--divider-color), same as everywhere else on the
          # card - no hardcoded color needs its own light/dark split.
          - type: custom:combined-card
            cards:
              - type: custom:mushroom-entity-card
                entity: input_select.epb_demo_litter_status
                name: Robot 1
                icon: mdi:robot-vacuum
                fill_container: false
                secondary_info: state
                icon_type: entity-picture
                tap_action:
                  action: none
                hold_action:
                  action: none
                double_tap_action:
                  action: none
                icon_color: blue-grey
                card_mod:
                  style: |
                    ha-card {
                      background: none;
                      border: none;
                    }
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_litter_level
                hide:
                  - icon
                bar_size: medium
                layout: horizontal
                name: Litter
                frameless: true
                marginless: false
                bar_position: compact_below
                height: 40px
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_litter_waste_drawer
                hide:
                  - icon
                bar_size: medium
                layout: horizontal
                name: Waste
                frameless: true
                marginless: false
                bar_position: compact_below
                height: 40px
            stackMode: vertical-stack
            hideGap: true
            card_mod:
              style: |
                ha-card {
                  border: 1px solid var(--divider-color) !important;
                  padding-bottom: 6px;
                }
          - type: heading
            heading: Height tests
            heading_style: subtitle
          - type: custom:combined-card
            cards:
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_battery
                name: default (no height)
                layout: horizontal
                bar_size: small
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_battery
                name: 100px
                layout: horizontal
                bar_size: small
                height: 100px
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_battery
                name: 35px
                layout: horizontal
                bar_size: small
                height: 35px
            stackMode: vertical-stack
            hideGap: true
      - type: grid
        cards:
          - type: heading
            heading: card_mod / uix reference — every --epb-* variable
            heading_style: title
          - type: custom:entity-progress-card-template-dev
            entity: input_number.epb_demo_battery
            icon: mdi:washing-machine
            name: Entity Progress Card
            secondary: Template
            badge_icon: mdi:update
            badge_color: green
            percent: '{{ states(entity) }}'
            force_circular_background: true
            center_zero: true
            card_mod:
              style: |
                ha-card {
                  --epb-zero-mark-color: red;
                  --epb-card-border-width: 2px;
                  --epb-card-border-color: red;
                  --epb-card-border-radius: 20px;
                  --epb-card-border-style: dashed;
                  --epb-progress-bar-color: yellow;
                  --epb-progress-bar-background-color: green;
                  --epb-icon-and-shape-color: lime;
                  --epb-low-watermark-color: #ff0000;
                  --epb-high-watermark-color: #00ff00;
                  --epb-watermark-opacity: 0.5;
                  --epb-watermark-line-size: 3px;
                  --epb-zero-mark-width: 4px;
                  --epb-progress-bar-size: 8px;
                  --epb-progress-bar-radius: 4px;
                  --epb-progress-inner-radius: 4px;
                  --epb-card-font-family: monospace;
                  --epb-name-color: orange;
                  --epb-name-font-size: 16px;
                  --epb-name-font-weight: 700;
                  --epb-name-letter-spacing: 2px;
                  --epb-detail-color: #aaaaaa;
                  --epb-detail-font-size: 12px;
                  --epb-detail-font-weight: 300;
                  --epb-detail-letter-spacing: 1px;
                }
      - type: grid
        cards:
          - type: heading
            heading: Multi row prototype — stacked cards, not a real mode yet
            heading_style: title
          - type: markdown
            content: >-
              Hand-stacked `entity-progress-card` rows, standing in for what a
              `density: single_line` row would render. Three questions to answer
              by eye: does `frameless` really neutralise the nested `ha-card`,
              is a row readable at `bar_size: xsmall`, and does the icon hold up
              at that height. Nothing here is a supported config — it is a
              throwaway probe.

          - type: heading
            heading: 1. bar only (today Multi look)
            heading_style: subtitle
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_printer_ink_black
            name: Black
            bar_color: black
            bar_size: xsmall
            frameless: true
            marginless: true
            hide:
              - icon
              - name
              - value
              - unit
              - secondary_info
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_printer_ink_cyan
            name: Cyan
            bar_color: cyan
            bar_size: xsmall
            frameless: true
            marginless: true
            hide:
              - icon
              - name
              - value
              - unit
              - secondary_info
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_circuit_kitchen
            name: Kitchen
            bar_color: amber
            bar_size: xsmall
            frameless: true
            marginless: true
            hide:
              - icon
              - name
              - value
              - unit
              - secondary_info
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_circuit_garage
            name: Garage
            bar_color: orange
            bar_size: xsmall
            frameless: true
            marginless: true
            hide:
              - icon
              - name
              - value
              - unit
              - secondary_info

          - type: heading
            heading: 2. icon + value (no name)
            heading_style: subtitle
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_printer_ink_black
            name: Black
            bar_color: black
            bar_size: xsmall
            frameless: true
            marginless: true
            hide:
              - name
              - secondary_info
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_printer_ink_cyan
            name: Cyan
            bar_color: cyan
            bar_size: xsmall
            frameless: true
            marginless: true
            hide:
              - name
              - secondary_info
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_circuit_kitchen
            name: Kitchen
            bar_color: amber
            bar_size: xsmall
            frameless: true
            marginless: true
            hide:
              - name
              - secondary_info
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_circuit_garage
            name: Garage
            bar_color: orange
            bar_size: xsmall
            frameless: true
            marginless: true
            hide:
              - name
              - secondary_info

          - type: heading
            heading: 3. name + value, no icon
            heading_style: subtitle
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_printer_ink_black
            name: Black
            bar_color: black
            bar_size: xsmall
            frameless: true
            marginless: true
            hide:
              - icon
              - secondary_info
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_printer_ink_cyan
            name: Cyan
            bar_color: cyan
            bar_size: xsmall
            frameless: true
            marginless: true
            hide:
              - icon
              - secondary_info
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_circuit_kitchen
            name: Kitchen
            bar_color: amber
            bar_size: xsmall
            frameless: true
            marginless: true
            hide:
              - icon
              - secondary_info
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_circuit_garage
            name: Garage
            bar_color: orange
            bar_size: xsmall
            frameless: true
            marginless: true
            hide:
              - icon
              - secondary_info

          - type: heading
            heading: 4. density single_line — icon | name | secondary | bar
            heading_style: subtitle
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_printer_ink_black
            name: Black
            bar_color: black
            bar_size: xsmall
            density: single_line
            frameless: true
            marginless: true
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_printer_ink_cyan
            name: Cyan
            bar_color: cyan
            bar_size: xsmall
            density: single_line
            frameless: true
            marginless: true
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_circuit_kitchen
            name: Kitchen
            bar_color: amber
            bar_size: xsmall
            density: single_line
            frameless: true
            marginless: true
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_circuit_garage
            name: Garage
            bar_color: orange
            bar_size: xsmall
            density: single_line
            frameless: true
            marginless: true

          - type: heading
            heading: reference — the real entity-progress-multi-card today
            heading_style: subtitle
          - type: custom:entity-progress-multi-card-dev
            hide:
              - icon
              - name
            bar_size: xsmall
            entities:
              - entity: input_number.epb_demo_printer_ink_black
                bar_color: black
              - entity: input_number.epb_demo_printer_ink_cyan
                bar_color: cyan
              - entity: input_number.epb_demo_circuit_kitchen
                bar_color: amber
              - entity: input_number.epb_demo_circuit_garage
                bar_color: orange

    badges:
      - type: custom:entity-progress-badge-dev
        entity: input_number.epb_demo_battery
        theme: optimal_when_high
    show_icon_and_title: true
    cards: []
  - title: EP Demo - CSS hooks (--epb-*)
    icon: mdi:palette-swatch-outline
    path: epb-css-hooks
    type: sections
    max_columns: 2
    sections:
      - type: grid
        cards:
          - type: heading
            heading: All 58 --epb-* CSS hooks, one at a time
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              Each card below sets exactly one `--epb-*` variable via
              `card_mod`, with every other card in its row left at its
              default for comparison. See
              [CSS hooks](../docs/theme.md#css) for the full reference table.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
      - type: grid
        cards:
          - type: heading
            heading: Card
            heading_style: subtitle
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'default (no override)'
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-card-height: 120px'
            card_mod:
              style: |
                :host { --epb-card-height: 120px; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-card-width: 300px'
            card_mod:
              style: |
                :host { --epb-card-width: 300px; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-card-border-width: 4px'
            card_mod:
              style: |
                :host { --epb-card-border-width: 4px; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-card-border-color: #ff6600'
            card_mod:
              style: |
                :host { --epb-card-border-color: #ff6600; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-card-border-radius: 20px'
            card_mod:
              style: |
                :host { --epb-card-border-radius: 20px; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-card-border-style: dashed'
            card_mod:
              style: |
                :host { --epb-card-border-style: dashed; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-card-font-family: monospace'
            card_mod:
              style: |
                :host { --epb-card-font-family: monospace; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-spacing: 20px'
            card_mod:
              style: |
                :host { --epb-spacing: 20px; }
      - type: grid
        cards:
          - type: heading
            heading: Icon
            heading_style: subtitle
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-icon-size: 40px'
            card_mod:
              style: |
                :host { --epb-icon-size: 40px; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-shape-size: 60px'
            card_mod:
              style: |
                :host { --epb-shape-size: 60px; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-icon-and-shape-color: #ff6600'
            card_mod:
              style: |
                :host { --epb-icon-and-shape-color: #ff6600; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-icon-color: #00ffff (icon only)'
            card_mod:
              style: |
                :host { --epb-icon-color: #00ffff; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-icon-shape-color: #ff00ff (shape only)'
            card_mod:
              style: |
                :host { --epb-icon-shape-color: #ff00ff; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-icon-shape-opacity: 0 (issue #136)'
            card_mod:
              style: |
                :host { --epb-icon-shape-opacity: 0; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-icon-shape-hover-color (hover the icon)'
            icon_tap_action:
              action: navigate
              navigation_path: /config/helpers
            card_mod:
              style: |
                :host { --epb-icon-shape-hover-color: #ff6600; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'hide: shape (YAML equivalent, Card only)'
            hide:
              - shape
          - type: custom:entity-progress-card-dev
            entity: sensor.epb_demo_battery_ev
            name: '--epb-charge-x1: 15% (tap to toggle charging)'
            icon_animation: battery_charging
            tap_action:
              action: call-service
              service: input_boolean.toggle
              target:
                entity_id: input_boolean.epb_demo_charging
            card_mod:
              style: |
                :host { --epb-charge-x1: 15%; }
          - type: custom:entity-progress-card-dev
            entity: sensor.epb_demo_battery_ev
            name: '--epb-charge-x2: 85% (tap to toggle charging)'
            icon_animation: battery_charging
            tap_action:
              action: call-service
              service: input_boolean.toggle
              target:
                entity_id: input_boolean.epb_demo_charging
            card_mod:
              style: |
                :host { --epb-charge-x2: 85%; }
          - type: custom:entity-progress-card-dev
            entity: sensor.epb_demo_battery_ev
            name: '--epb-charge-y1: 45% (tap to toggle charging)'
            icon_animation: battery_charging
            tap_action:
              action: call-service
              service: input_boolean.toggle
              target:
                entity_id: input_boolean.epb_demo_charging
            card_mod:
              style: |
                :host { --epb-charge-y1: 45%; }
      - type: grid
        cards:
          - type: heading
            heading: Progress Bar
            heading_style: subtitle
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-progress-transition: 2s linear (move the slider)'
            card_mod:
              style: |
                :host { --epb-progress-transition: 2s linear; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-progress-bar-color: magenta'
            card_mod:
              style: |
                :host { --epb-progress-bar-color: magenta; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-progress-bar-background-color: #222222'
            card_mod:
              style: |
                :host { --epb-progress-bar-background-color: #222222; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-progress-bar-size: 90%'
            card_mod:
              style: |
                :host { --epb-progress-bar-size: 90%; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-progress-bar-radius: 0px (square)'
            card_mod:
              style: |
                :host { --epb-progress-bar-radius: 0px; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-progress-inner-radius: 0px (square fill)'
            card_mod:
              style: |
                :host { --epb-progress-inner-radius: 0px; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-progress-bar-min-width: 80px (set slider near 0%)'
            card_mod:
              style: |
                :host { --epb-progress-bar-min-width: 80px; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-bar-segment-gap: 8px'
            bar_segments: 5
            card_mod:
              style: |
                :host { --epb-bar-segment-gap: 8px; }
      - type: grid
        cards:
          - type: heading
            heading: Marker (rainbow_full + zero-mark)
            heading_style: subtitle
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-rainbow-marker-color: lime'
            theme: optimal_when_high
            bar_color_mode: rainbow_full
            card_mod:
              style: |
                :host { --epb-rainbow-marker-color: lime; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-rainbow-marker-opacity: 0.3'
            theme: optimal_when_high
            bar_color_mode: rainbow_full
            card_mod:
              style: |
                :host { --epb-rainbow-marker-opacity: 0.3; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-rainbow-marker-size: 16px'
            theme: optimal_when_high
            bar_color_mode: rainbow_full
            card_mod:
              style: |
                :host { --epb-rainbow-marker-size: 16px; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-rainbow-marker-border-color: black'
            theme: optimal_when_high
            bar_color_mode: rainbow_full
            card_mod:
              style: |
                :host { --epb-rainbow-marker-border-color: black; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-rainbow-marker-border-width: 4px'
            theme: optimal_when_high
            bar_color_mode: rainbow_full
            card_mod:
              style: |
                :host { --epb-rainbow-marker-border-width: 4px; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_power
            name: '--epb-zero-mark-width: 6px'
            center_zero: true
            min_value: -3000
            max_value: 3000
            card_mod:
              style: |
                :host { --epb-zero-mark-width: 6px; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_power
            name: '--epb-zero-mark-color: lime'
            center_zero: true
            min_value: -3000
            max_value: 3000
            card_mod:
              style: |
                :host { --epb-zero-mark-color: lime; }
      - type: grid
        cards:
          - type: heading
            heading: Name
            heading_style: subtitle
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-name-color: #ff6600'
            card_mod:
              style: |
                :host { --epb-name-color: #ff6600; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-name-font-size: 24px'
            card_mod:
              style: |
                :host { --epb-name-font-size: 24px; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-name-font-weight: 900'
            card_mod:
              style: |
                :host { --epb-name-font-weight: 900; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-name-letter-spacing: 6px'
            card_mod:
              style: |
                :host { --epb-name-letter-spacing: 6px; }
      - type: grid
        cards:
          - type: heading
            heading: Detail (secondary_info)
            heading_style: subtitle
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-detail-color: #ff6600'
            state_content: last_changed
            card_mod:
              style: |
                :host { --epb-detail-color: #ff6600; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-detail-font-size: 18px'
            state_content: last_changed
            card_mod:
              style: |
                :host { --epb-detail-font-size: 18px; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-detail-font-weight: 900'
            state_content: last_changed
            card_mod:
              style: |
                :host { --epb-detail-font-weight: 900; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-detail-letter-spacing: 4px'
            state_content: last_changed
            card_mod:
              style: |
                :host { --epb-detail-letter-spacing: 4px; }
      - type: grid
        cards:
          - type: heading
            heading: Trend
            heading_style: subtitle
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-trend-icon-color: #ff6600'
            trend_indicator: true
            card_mod:
              style: |
                :host { --epb-trend-icon-color: #ff6600; }
      - type: grid
        cards:
          - type: heading
            heading: Watermark
            heading_style: subtitle
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-watermark-line-size: 6px'
            watermark:
              type: blended
              low: 20
              high: 80
            card_mod:
              style: |
                :host { --epb-watermark-line-size: 6px; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-watermark-opacity: 1'
            watermark:
              type: blended
              low: 20
              high: 80
            card_mod:
              style: |
                :host { --epb-watermark-opacity: 1; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-low-watermark-opacity: 1 (low side only)'
            watermark:
              type: blended
              low: 20
              high: 80
            card_mod:
              style: |
                :host { --epb-low-watermark-opacity: 1; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-high-watermark-opacity: 1 (high side only)'
            watermark:
              type: blended
              low: 20
              high: 80
            card_mod:
              style: |
                :host { --epb-high-watermark-opacity: 1; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-low-watermark-color: lime'
            watermark:
              type: blended
              low: 20
              high: 80
            card_mod:
              style: |
                :host { --epb-low-watermark-color: lime; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-high-watermark-color: magenta'
            watermark:
              type: blended
              low: 20
              high: 80
            card_mod:
              style: |
                :host { --epb-high-watermark-color: magenta; }
      - type: grid
        cards:
          - type: heading
            heading: Peak Marker
            heading_style: subtitle
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-peak-min-color: #00ffff'
            peak_marker:
              min: true
              max: true
              average: true
            card_mod:
              style: |
                :host { --epb-peak-min-color: #00ffff; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-peak-min-opacity: 1'
            peak_marker:
              min: true
              max: true
              average: true
            card_mod:
              style: |
                :host { --epb-peak-min-opacity: 1; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-peak-max-color: #ff00ff'
            peak_marker:
              min: true
              max: true
              average: true
            card_mod:
              style: |
                :host { --epb-peak-max-color: #ff00ff; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-peak-max-opacity: 1'
            peak_marker:
              min: true
              max: true
              average: true
            card_mod:
              style: |
                :host { --epb-peak-max-opacity: 1; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-peak-average-color: #ffff00'
            peak_marker:
              min: true
              max: true
              average: true
            card_mod:
              style: |
                :host { --epb-peak-average-color: #ffff00; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-peak-average-opacity: 1'
            peak_marker:
              min: true
              max: true
              average: true
            card_mod:
              style: |
                :host { --epb-peak-average-opacity: 1; }
      - type: grid
        cards:
          - type: heading
            heading: Alert
            heading_style: subtitle
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: '--epb-alert-background-opacity: 0.9'
            alert_when:
              color: red
              highlight: background
              below: 25
              animation: static
            card_mod:
              style: |
                :host { --epb-alert-background-opacity: 0.9; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: '--epb-ping-color: blue'
            alert_when:
              color: red
              highlight: border
              below: 25
              animation: ping
            card_mod:
              style: |
                :host { --epb-ping-color: blue; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: '--epb-ping-spread: 30px'
            alert_when:
              color: red
              highlight: border
              below: 25
              animation: ping
            card_mod:
              style: |
                :host { --epb-ping-spread: 30px; }
      - type: grid
        cards:
          - type: heading
            heading: Status Label
            heading_style: subtitle
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-label-color: black'
            status_label:
              jinja: status
            card_mod:
              style: |
                :host { --epb-label-color: black; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-label-background-color: yellow'
            status_label:
              jinja: status
            card_mod:
              style: |
                :host { --epb-label-background-color: yellow; }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '--epb-label-border-color: blue'
            status_label:
              jinja: status
            card_mod:
              style: |
                :host { --epb-label-border-color: blue; }
  - title: EP Demo - Regression tests (past issues)
    icon: mdi:flask-outline
    path: epb-regression
    type: sections
    max_columns: 2
    sections:
      - type: grid
        cards:
          - type: heading
            heading: '#31 — watermark: only low defined, no phantom high line'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              watermark:
                type: line
                low:
                  value: 30
                  color: blue
                high: false
              ```
              Only `low` is set, `high` explicitly disabled (it has its own
              fallback default, so leaving it merely unset isn't enough).
              Check: a single line renders, not a phantom second one.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '#31 low only'
            watermark:
              type: line
              low:
                value: 30
                color: blue
              high: false
      - type: grid
        cards:
          - type: heading
            heading: "#41 — min_value == max_value shows Div0, doesn't crash"
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              min_value: 50
              max_value: 50
              ```
              A degenerate range (`min_value == max_value`, division-by-zero
              territory). Check: the card shows "Div0" gracefully instead of
              crashing or rendering `NaN`.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '#41 degenerate range'
            min_value: 50
            max_value: 50
      - type: grid
        cards:
          - type: heading
            heading: "#63 — hide: [name] doesn't hide the bar (horizontal)"
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              layout: horizontal
              hide: [name]
              ```
              Hiding `name` alone on a horizontal card. Check: the bar still
              renders - it used to disappear along with the name.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '#63 hide name only'
            layout: horizontal
            hide:
              - name
      - type: grid
        cards:
          - type: heading
            heading: '#75 — bar_effect: radius, every corner (small & medium)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              bar_size: small
              bar_effect: [radius]
              ```
              `bar_effect: radius` should round every corner, at every
              `bar_size` - not just some of them.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '#75 small'
            bar_size: small
            bar_effect:
              - radius
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              bar_size: medium
              bar_effect: [radius]
              ```
              Same check, at `bar_size: medium`.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '#75 medium'
            bar_size: medium
            bar_effect:
              - radius
      - type: grid
        cards:
          - type: heading
            heading: '#99 — overlay text, bar_single_line'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              bar_position: overlay
              bar_single_line: true
              bar_size: large
              ```
              Overlay text with `bar_single_line: true`. Check: text stays
              readable and centered on the bar, not fuzzy/shadowed.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '#99'
            bar_position: overlay
            bar_single_line: true
            bar_size: large
      - type: grid
        cards:
          - type: heading
            heading: '#106 — state_content: [last_updated] resolves, not Unknown'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              state_content: [last_updated]
              ```
              `state_content: [last_updated]` alone, no `state`. Check: it
              shows a real relative time, not "Unknown".
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '#106'
            state_content:
              - last_updated
      - type: grid
        cards:
          - type: heading
            heading: '#121 — percent > 100% renders fully filled, not glitched'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-template-dev
              entity: input_number.epb_demo_battery
              percent: "150"
              ```
              A `percent` above 100. Check: the bar renders fully filled
              (clamped), not visually glitched or overflowing.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-template-dev
            entity: input_number.epb_demo_battery
            name: '#121'
            percent: '150'
      - type: grid
        cards:
          - type: heading
            heading: '#127/#125 — timer active-state icon_animation + Jinja trigger'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: timer.epb_demo_timer
              icon_animation: washing_machine
              tap_action:
                action: call-service
                service: timer.start
              ```
              `icon_animation: washing_machine` should trigger from the
              timer's own active state. Check: the icon animates once you
              start the timer (tap the card).
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: timer.epb_demo_timer
            name: '#127 washing_machine (start the timer)'
            icon_animation: washing_machine
            tap_action:
              action: call-service
              service: timer.start
              target:
                entity_id: timer.epb_demo_timer
            icon: mdi:washing-machine
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              icon_animation:
                effect: battery_charging
                jinja: "{{ states('input_number.epb_demo_battery') | float > 20 }}"
              ```
              `icon_animation` driven by a Jinja condition instead of the
              entity's own active/inactive state. Check: the animation
              follows the Jinja result, not the automatic detection.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '#125 Jinja-triggered animation'
            icon_animation:
              effect: battery_charging
              jinja: "{{ states('input_number.epb_demo_battery') | float > 20 }}"
      - type: grid
        cards:
          - type: heading
            heading: "#129/#133 — hide: name in horizontal doesn't leave a gap"
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              layout: horizontal
              hide: [name]
              ```
              Hiding `name` on a horizontal card used to leave an empty gap
              instead of shrinking. Check: no dead space where the name used
              to be.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '#129 hide name, no gap'
            layout: horizontal
            hide:
              - name
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              bar_size: xlarge
              hide: [icon]
              ```
              `bar_size: xlarge` with the icon hidden used to get squeezed
              into a single grid row. Check: the card gets its full 2 rows.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: '#133 xlarge + hidden icon, full 2 rows'
            bar_size: xlarge
            hide:
              - icon
            grid_options:
              columns: 6
              rows: 2
      - type: grid
        cards:
          - type: heading
            heading: '#129 follow-up — center_zero negative arm: theme gradient order/direction'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_temp_negative
              theme: temperature
              bar_color_mode: rainbow
              center_zero:
                value: 100
                growth_percent: false
              min_value: -20
              ```
              `center_zero`'s negative arm with a theme + `rainbow` used to
              render a single flat color instead of a gradient. Check: the
              negative arm fades through its zones properly.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_negative
            theme: temperature
            name: '#129 follow-up'
            bar_color_mode: rainbow
            icon: mdi:book
            center_zero:
              value: 100
              growth_percent: false
            min_value: -20
            grid_options:
              columns: 12
              rows: 1
      - type: grid
        cards:
          - type: heading
            heading: "Template percent: '' still paints (not blank)"
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-template-dev
              entity: input_number.epb_demo_battery
              theme: critical_when_low
              percent: ''
              ```
              An empty `percent` used to never subscribe at all, leaving the
              icon/bar/theme unpainted forever. Check: icon and bar still
              show 0%'s own theme color instead of staying blank.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-template-dev
            entity: input_number.epb_demo_battery
            name: "percent: ''"
            theme: critical_when_low
            percent: ''
      - type: grid
        cards:
          - type: heading
            heading: 'center_zero + theme + bar_color_mode: no gap past max_value'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-template-dev
              entity: input_number.epb_demo_battery
              percent: '150'
              theme: critical_when_low
              center_zero: true
              bar_color_mode: segment
              ```
              A value past 100% used to leave a gap in the positive arm
              instead of a clean, fully-filled edge. Check: the arm fills
              cleanly, no hole.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-template-dev
            entity: input_number.epb_demo_battery
            name: 'percent: 150, center_zero'
            percent: '150'
            theme: critical_when_low
            center_zero: true
            bar_color_mode: segment
      - type: grid
        cards:
          - type: heading
            heading: "status_label color: '' falls back, doesn't go blank"
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              theme: critical_when_low
              status_label:
                jinja: "{{ {'label': 'test', 'color': ''} }}"
              ```
              An explicit but empty `color` in the {label, color} object used
              to leave the pill without a color at all. Check: the pill
              falls back to the bar's own color instead.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: "status_label color: ''"
            theme: critical_when_low
            status_label:
              jinja: "{{ {'label': 'test', 'color': ''} }}"
      - type: grid
        cards:
          - type: heading
            heading: 'badge_icon {icon, color}: color clears when dropped, not stuck'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              badge_icon: >-
                {% set c = states('counter.epb_demo_counter') | int(0) %}
                {% if c % 2 == 0 %}
                  {{ {'icon': 'mdi:robot-vacuum', 'color': 'red'} }}
                {% else %}
                  {{ {'icon': 'mdi:robot-vacuum'} }}
                {% endif %}
              ```
              Tap the counter tile next to it to increment. Even: icon on a
              red badge. Odd: same icon, no color key at all - check the
              badge background actually resets instead of staying red.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'badge color clears'
            badge_icon: >-
              {% set c = states('counter.epb_demo_counter') | int(0) %}
              {% if c % 2 == 0 %}
                {{ {'icon': 'mdi:robot-vacuum', 'color': 'red'} }}
              {% else %}
                {{ {'icon': 'mdi:robot-vacuum'} }}
              {% endif %}
            grid_options:
              columns: 6
              rows: 1
          - type: tile
            entity: counter.epb_demo_counter
            name: 'counter (tap +1 / hold -1 / dbl reset)'
            tap_action:
              action: call-service
              service: counter.increment
              target:
                entity_id: counter.epb_demo_counter
            hold_action:
              action: call-service
              service: counter.decrement
              target:
                entity_id: counter.epb_demo_counter
            double_tap_action:
              action: call-service
              service: counter.reset
              target:
                entity_id: counter.epb_demo_counter
            grid_options:
              columns: 6
              rows: 1
      - type: grid
        cards:
          - type: heading
            heading: >-
              Issue #135 non-regression: two near-identical Template
              badge/animation conditions, only one is ever true
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-template-dev
              icon: mdi:fan
              density: compact
              hide: [progress_bar]
              icon_animation:
                effect: spin
                jinja: |-
                  {{ is_state('input_boolean.epb_demo_ac_status', 'on')
                     and is_state('input_select.epb_demo_ac_mode', 'Faible') }}
              badge_icon: |
                {% if is_state('input_boolean.epb_demo_ac_status', 'on')
                   and is_state('input_select.epb_demo_ac_mode', 'Faible') %}
                  mdi:lightning-bolt
                {% endif %}
              badge_color: |
                {% if is_state('input_boolean.epb_demo_ac_status', 'on')
                   and is_state('input_select.epb_demo_ac_mode', 'Faible') %}
                  green
                {% endif %}
              ```
              Reproduces issue #135 as closely as possible: two Template
              cards, same two helper entities, structurally identical
              `badge_icon`/`badge_color`/`icon_animation.jinja` each checking
              a *different* `input_select` option ("Faible" vs "Fort").
              Toggle the AC status on, then tap each mode tile - each tap
              runs a script changing both helpers at once, just like the
              reporter's real dashboard. Fixed in 1.6.1-rc8: only the card
              matching the current mode shows a badge or spins now (was a
              debounce/race condition - HA pushes one intermediate Jinja
              result per helper change, not just the final settled one).
              {% endraw %}
            grid_options:
              columns: 12
              rows: 3
          - type: custom:entity-progress-card-template-dev
            icon: mdi:fan
            name: 'Faible'
            density: compact
            hide: [progress_bar]
            icon_animation:
              effect: spin
              jinja: |-
                {{ is_state('input_boolean.epb_demo_ac_status', 'on')
                   and is_state('input_select.epb_demo_ac_mode', 'Faible') }}
            badge_icon: |
              {% if is_state('input_boolean.epb_demo_ac_status', 'on')
                 and is_state('input_select.epb_demo_ac_mode', 'Faible') %}
                mdi:lightning-bolt
              {% endif %}
            badge_color: |
              {% if is_state('input_boolean.epb_demo_ac_status', 'on')
                 and is_state('input_select.epb_demo_ac_mode', 'Faible') %}
                green
              {% endif %}
            tap_action:
              action: call-service
              service: script.turn_on
              target:
                entity_id: script.epb_demo_ac_faible
            grid_options:
              columns: 3
              rows: 1
          - type: custom:entity-progress-card-template-dev
            icon: mdi:snowflake
            name: 'Fort'
            density: compact
            hide: [progress_bar]
            icon_animation:
              effect: spin
              jinja: |-
                {{ is_state('input_boolean.epb_demo_ac_status', 'on')
                   and is_state('input_select.epb_demo_ac_mode', 'Fort') }}
            badge_icon: |
              {% if is_state('input_boolean.epb_demo_ac_status', 'on')
                 and is_state('input_select.epb_demo_ac_mode', 'Fort') %}
                mdi:lightning-bolt
              {% endif %}
            badge_color: |
              {% if is_state('input_boolean.epb_demo_ac_status', 'on')
                 and is_state('input_select.epb_demo_ac_mode', 'Fort') %}
                green
              {% endif %}
            tap_action:
              action: call-service
              service: script.turn_on
              target:
                entity_id: script.epb_demo_ac_fort
            grid_options:
              columns: 3
              rows: 1
          - type: tile
            entity: input_boolean.epb_demo_ac_status
            name: 'AC status (toggle)'
            tap_action:
              action: toggle
            grid_options:
              columns: 3
              rows: 1
          - type: entities
            entities:
              - input_select.epb_demo_ac_mode
            grid_options:
              columns: 3
              rows: 1
      - type: grid
        cards:
          - type: heading
            heading: >-
              status_label repaints immediately on a percent-driven theme
              change
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-template-dev
              entity: input_number.epb_demo_battery
              percent: "{{ states('counter.epb_demo_counter') | int(0) }}"
              theme: critical_when_low
              status_label:
                jinja: watching
              ```
              Tap the counter tile next to it to cross a theme zone (e.g.
              below 20 into the red). `status_label.jinja` is static text,
              so it never re-pushes on its own. Check: the pill's color
              follows the bar immediately, not just on some unrelated
              refresh.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-template-dev
            entity: input_number.epb_demo_battery
            name: titi
            percent: "{{ states('counter.epb_demo_counter') | int(0) }}"
            theme: critical_when_low
            status_label:
              jinja: watching
            grid_options:
              columns: 6
              rows: 1
          - type: tile
            entity: counter.epb_demo_counter
            name: 'counter (tap +1 / hold -1 / dbl reset)'
            tap_action:
              action: call-service
              service: counter.increment
              target:
                entity_id: counter.epb_demo_counter
            hold_action:
              action: call-service
              service: counter.decrement
              target:
                entity_id: counter.epb_demo_counter
            double_tap_action:
              action: call-service
              service: counter.reset
              target:
                entity_id: counter.epb_demo_counter
            grid_options:
              columns: 6
              rows: 1
      - type: grid
        cards:
          - type: heading
            heading: >-
              Removing badge_icon in the editor doesn't leave a phantom badge
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              Manual test (an editor workflow, not visible just by loading
              this page): open this card's editor, delete the `badge_icon`
              line entirely (not just clear its content) and Save. Check:
              the badge disappears cleanly - it used to stay stuck on screen
              after the key was removed, because its resolved state was
              never reset on `setConfig`.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'delete badge_icon below, then Save'
            badge_icon: "{{ 'mdi:alert' }}"
            badge_color: "{{ 'red' }}"
      - type: grid
        cards:
          - type: heading
            heading: >-
              Editor: "Independent color" toggle only shows once Badge is on
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              Manual test (editor UI, not visible just by loading this
              page): open this card's editor (Markers panel). Neither
              `badge_icon` nor `badge_color` is set below, so the "Badge"
              toggle is off. Check: the "Independent color" toggle is not
              shown at all yet - it's nested under "Badge", not offered as
              its own starting point. Now switch "Badge" on: check
              "Independent color" appears right below it.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'toggle Badge, watch Independent color appear'
      - type: grid
        cards:
          - type: heading
            heading: "Editor: badge_color field has no redundant label"
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              Manual test (editor UI, not visible just by loading this
              page): open this card's editor (Markers panel) - "Badge" and
              "Independent color" are both already on below. Check: the
              Jinja field under "Independent color" has no separate "Badge
              color" label above it, same as the "Badge" field right above
              it - the toggle's own name already says what it is.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'check the field label below Independent color'
            badge_icon: "{{ 'mdi:alert' }}"
            badge_color: "{{ 'red' }}"
      - type: grid
        cards:
          - type: heading
            heading: 'theme: battery_adaptive on Template stays in sync with charging'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-template-dev
              entity: sensor.epb_demo_battery_ev
              percent: "{{ states('sensor.epb_demo_battery_ev') }}"
              theme: battery_adaptive
              bar_color_mode: rainbow_full
              icon_animation: battery_charging
              ```
              Tap the card to toggle charging - the percent itself doesn't
              change, only the `battery_charging` attribute does, so the
              theme used to stay stuck on whatever it resolved to at the
              last percent push. `rainbow_full` shows the whole gradient
              shape at once (not just the fill up to the current value), so
              the switch between `critical_when_extreme`/`critical_when_low`
              reads clearly regardless of the current percent.
              `icon_animation: battery_charging` is a second, independent
              signal - if the icon animates but the bar doesn't react, the
              theme side specifically is still broken. Check: both react
              immediately on tap, not just eventually.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-template-dev
            entity: sensor.epb_demo_battery_ev
            name: 'battery_adaptive (tap to toggle charging)'
            percent: "{{ states('sensor.epb_demo_battery_ev') }}"
            theme: battery_adaptive
            bar_color_mode: rainbow_full
            icon_animation: battery_charging
            tap_action:
              action: call-service
              service: input_boolean.toggle
              target:
                entity_id: input_boolean.epb_demo_charging
      - type: grid
        cards:
          - type: heading
            heading: >-
              status_label.color_source follows a plain Jinja bar_color, no
              theme needed
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-template-dev
              entity: input_number.epb_demo_battery
              percent: "{{ states('input_number.epb_demo_battery') }}"
              bar_color: >-
                {{ 'red' if states('input_number.epb_demo_battery') | float > 50
                   else 'green' }}
              status_label:
                jinja: watching
                color_source: bar
              ```
              No `theme:` here - `bar_color` is a plain Jinja color.
              `color_source: bar` used to only work once a theme was active
              (`ViewCore.barColor` returned null for a plain Jinja push,
              nothing cached the resolved color anywhere `status_label`
              could read). Check: the pill follows the bar's red/green
              directly, no theme required.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-template-dev
            entity: input_number.epb_demo_battery
            name: 'color_source without theme'
            percent: "{{ states('input_number.epb_demo_battery') }}"
            bar_color: >-
              {{ 'red' if states('input_number.epb_demo_battery') | float > 50
                 else 'green' }}
            status_label:
              jinja: watching
              color_source: bar
      - type: grid
        cards:
          - type: heading
            heading: 'status_label.color_source: icon vs bar, side by side'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              color: red
              bar_color: green
              status_label:
                jinja: icon color
                color_source: icon
              ```
              Icon is red, bar is green. Check: this pill (`color_source:
              icon`) reads red - the one next to it (`color_source: bar`)
              reads green instead, same icon/bar colors.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'color_source: icon'
            color: red
            bar_color: green
            status_label:
              jinja: icon color
              color_source: icon
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'color_source: bar'
            color: red
            bar_color: green
            status_label:
              jinja: bar color
              color_source: bar
      - type: grid
        cards:
          - type: heading
            heading: 'Template watermark.low/.high in jinja mode now resolves'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-template-dev
              percent: '60'
              watermark:
                low:
                  jinja: "{{ 30 }}"
              ```
              `jinjaWatermarkLow`/`.High` are now declared on `ViewCore`
              itself (shared with `ViewBase`, same reasoning as
              `jinjaAlertAbove`/`.Below`), and both Card's and Template's
              `_getJinjaHandlers` route `watermark.low`/`.high` through the
              new shared `HABase._renderWatermarkJinja`. Both cards below now
              show the low mark.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'Card (mark shows)'
            watermark:
              low:
                jinja: "{{ 30 }}"
          - type: custom:entity-progress-card-template-dev
            entity: input_number.epb_demo_battery
            name: 'Template (mark shows too)'
            percent: '60'
            watermark:
              low:
                jinja: "{{ 30 }}"
      - type: grid
        cards:
          - type: heading
            heading: 'rainbow_full marker now mirrors for bar_orientation: rtl'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              theme: optimal_when_high
              bar_color_mode: rainbow_full
              bar_orientation: rtl
              ```
              A theme is required - `INERT_OPTIONS` (schema.ts)
              silently resets `bar_color_mode` back to `auto` without one.
              `transform: scaleX(-1)` now sits on `.bar-container` (shared
              parent of both `.bar` and `.value-mark`) instead of `.bar`
              alone, so the marker mirrors right along with the fill.
              Compare: both cards below have the marker right at the fill's
              edge now.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'ltr (correct)'
            theme: optimal_when_high
            bar_color_mode: rainbow_full
            bar_orientation: ltr
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'rtl (correct too)'
            theme: optimal_when_high
            bar_color_mode: rainbow_full
            bar_orientation: rtl
      - type: grid
        cards:
          - type: heading
            heading: >-
              multiline collapse when empty (replaces the old `:has()`-based
              rule, Firefox 94+ safe)
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              multiline: true
              custom_info: >-
                {% if is_state('input_boolean.epb_demo_simple_mode', 'on') %}
                {% else %}Line one<br>Line two{% endif %}
              ```
              Toggle the helper below: `custom_info` resolves to an empty
              string when on (both multiline rows empty) - check the
              secondary-info row collapses entirely, no leftover gap. Off:
              both lines show.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'multiline: collapse when empty'
            multiline: true
            custom_info: >-
              {% if is_state('input_boolean.epb_demo_simple_mode', 'on') %}
              {% else %}Line one<br>Line two{% endif %}
          - type: tile
            entity: input_boolean.epb_demo_simple_mode
            name: Toggle to empty the multiline content
            tap_action:
              action: toggle
      - type: grid
        cards:
          - type: heading
            heading: >-
              #139 — layout: vertical + bar_position: top/bottom/background,
              hidden name/secondary_info squeezed the icon
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-template-dev
              layout: vertical
              bar_position: bottom
              height: 55px
              hide: [name, secondary_info]
              ```
              With name/secondary_info both hidden, `.content`'s reserved
              height for those rows didn't zero out for bar_position: top/
              bottom/background (only `default` did) - a small explicit
              `height:` then squeezed the icon into whatever was left over.
              Check: the icon renders centered, not squished. First row is
              @RkcCorian's original repro (own entities swapped for our VOC
              helpers), second row covers the `top`/`background` variants.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: horizontal-stack
            cards:
              - type: custom:entity-progress-card-template-dev
                entity: input_number.epb_demo_voc_good
                name: VOC good
                secondary: '{{ state_translated(entity) }} ppb'
                bar_position: bottom
                layout: vertical
                percent: |-
                  {{ ((states(entity) | float(0) / 2500) * 100) | round(0) if
                  is_number(states(entity)) }}
                icon: mdi:molecule
                height: 55px
                hide:
                  - name
                  - secondary_info
                color: |-
                  {% if (states(entity) | int(0) > 1600) %}
                    var(--error-color)
                  {% elif (states(entity) | int(0) > 900) %}
                    var(--warning-color)
                  {% else %}
                    var(--success-color)
                  {% endif %}
                bar_color: |-
                  {% if (states(entity) | int(0) > 1600) %}
                    linear-gradient(90deg, orange, red)
                  {% elif (states(entity) | int(0) > 900) %}
                    linear-gradient(90deg, yellow, orange)
                  {% else %}
                    linear-gradient(90deg, lightgreen, green)
                  {% endif %}
              - type: custom:entity-progress-card-template-dev
                entity: input_number.epb_demo_voc_moderate
                name: VOC moderate
                secondary: '{{ state_translated(entity) }} ppb'
                bar_position: bottom
                layout: vertical
                percent: |-
                  {{ ((states(entity) | float(0) / 2500) * 100) | round(0) if
                  is_number(states(entity)) }}
                icon: mdi:molecule
                height: 55px
                hide:
                  - name
                  - secondary_info
                color: |-
                  {% if (states(entity) | int(0) > 1600) %}
                    var(--error-color)
                  {% elif (states(entity) | int(0) > 900) %}
                    var(--warning-color)
                  {% else %}
                    var(--success-color)
                  {% endif %}
                bar_color: |-
                  {% if (states(entity) | int(0) > 1600) %}
                    linear-gradient(90deg, orange, red)
                  {% elif (states(entity) | int(0) > 900) %}
                    linear-gradient(90deg, yellow, orange)
                  {% else %}
                    linear-gradient(90deg, lightgreen, green)
                  {% endif %}
              - type: custom:entity-progress-card-template-dev
                entity: input_number.epb_demo_voc_poor
                name: VOC poor
                secondary: '{{ state_translated(entity) }} ppb'
                bar_position: bottom
                layout: vertical
                percent: |-
                  {{ ((states(entity) | float(0) / 2500) * 100) | round(0) if
                  is_number(states(entity)) }}
                icon: mdi:molecule
                height: 55px
                hide:
                  - name
                  - secondary_info
                color: |-
                  {% if (states(entity) | int(0) > 1600) %}
                    var(--error-color)
                  {% elif (states(entity) | int(0) > 900) %}
                    var(--warning-color)
                  {% else %}
                    var(--success-color)
                  {% endif %}
                bar_color: |-
                  {% if (states(entity) | int(0) > 1600) %}
                    linear-gradient(90deg, orange, red)
                  {% elif (states(entity) | int(0) > 900) %}
                    linear-gradient(90deg, yellow, orange)
                  {% else %}
                    linear-gradient(90deg, lightgreen, green)
                  {% endif %}
              - type: custom:entity-progress-card-template-dev
                entity: input_number.epb_demo_voc_bad
                name: VOC bad
                secondary: '{{ state_translated(entity) }} ppb'
                bar_position: bottom
                layout: vertical
                percent: |-
                  {{ ((states(entity) | float(0) / 2500) * 100) | round(0) if
                  is_number(states(entity)) }}
                icon: mdi:molecule
                height: 55px
                hide:
                  - name
                  - secondary_info
                color: |-
                  {% if (states(entity) | int(0) > 1600) %}
                    var(--error-color)
                  {% elif (states(entity) | int(0) > 900) %}
                    var(--warning-color)
                  {% else %}
                    var(--success-color)
                  {% endif %}
                bar_color: |-
                  {% if (states(entity) | int(0) > 1600) %}
                    linear-gradient(90deg, orange, red)
                  {% elif (states(entity) | int(0) > 900) %}
                    linear-gradient(90deg, yellow, orange)
                  {% else %}
                    linear-gradient(90deg, lightgreen, green)
                  {% endif %}
              - type: custom:entity-progress-card-template-dev
                entity: input_number.epb_demo_voc_hazardous
                name: VOC hazardous
                secondary: '{{ state_translated(entity) }} ppb'
                bar_position: bottom
                layout: vertical
                percent: |-
                  {{ ((states(entity) | float(0) / 2500) * 100) | round(0) if
                  is_number(states(entity)) }}
                icon: mdi:molecule
                height: 55px
                hide:
                  - name
                  - secondary_info
                color: |-
                  {% if (states(entity) | int(0) > 1600) %}
                    var(--error-color)
                  {% elif (states(entity) | int(0) > 900) %}
                    var(--warning-color)
                  {% else %}
                    var(--success-color)
                  {% endif %}
                bar_color: |-
                  {% if (states(entity) | int(0) > 1600) %}
                    linear-gradient(90deg, orange, red)
                  {% elif (states(entity) | int(0) > 900) %}
                    linear-gradient(90deg, yellow, orange)
                  {% else %}
                    linear-gradient(90deg, lightgreen, green)
                  {% endif %}
            grid_options:
              columns: 12
              rows: auto
            card_mod:
              style: |
                ha-card {
                  height: 25px !important;
                }
          - type: horizontal-stack
            cards:
              - type: custom:entity-progress-card-template-dev
                entity: input_number.epb_demo_battery
                name: '#139 top'
                layout: vertical
                bar_position: top
                height: 55px
                hide: [name, secondary_info]
                percent: '{{ states(entity) }}'
              - type: custom:entity-progress-card-template-dev
                entity: input_number.epb_demo_battery
                name: '#139 background'
                layout: vertical
                bar_position: background
                height: 55px
                hide: [name, secondary_info]
                percent: '{{ states(entity) }}'
      - type: grid
        cards:
          - type: heading
            heading: 'bar_segments: markers no longer hidden by segment gaps'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card
              entity: input_number.epb_demo_battery
              bar_segments: 10
              watermark:
                low: 30
                high: 70
              peak_marker:
                window: 2h
                min: true
                max: true
                average: true
              ```
              A segment divider used to paint over a watermark/peak marker
              landing on it, hiding the line entirely. Check: both stay
              visible on top of the segmented bar.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'bar_segments + markers'
            bar_segments: 10
            watermark:
              low: 30
              high: 70
            peak_marker:
              window: 2h
              min: true
              max: true
              average: true
            grid_options:
              columns: 12
              rows: 1
      - type: grid
        cards:
          - type: heading
            heading: 'bar_segments + center_zero: each arm segments independently'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card
              entity: input_number.epb_demo_temp_negative
              theme: temperature
              bar_segments: 8
              center_zero:
                value: 100
                growth_percent: false
              min_value: -20
              ```
              Each arm now cuts into its own 8 cells instead of sharing one
              count across the whole bar.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_negative
            theme: temperature
            name: 'bar_segments + center_zero'
            bar_segments: 8
            center_zero:
              value: 100
              growth_percent: false
            min_value: -20
            grid_options:
              columns: 12
              rows: 1
      - type: grid
        cards:
          - type: heading
            heading: 'badge + layout: vertical — no clipping on any bar_position'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card
              entity: input_number.epb_demo_battery
              layout: vertical
              bar_position: top
              badge_icon: mdi:alert
              ```
              The badge overhangs the icon's own box, and a vertical card clips
              its container. `default` reserves padding above and always looked
              right; every other position cut the badge's top edge off from
              1.6.1 on. Check: the six badges below are whole circles, the
              first one included.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 3
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: default
            layout: vertical
            bar_position: default
            badge_icon: mdi:alert
            grid_options:
              columns: 4
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: below
            layout: vertical
            bar_position: below
            badge_icon: mdi:alert
            grid_options:
              columns: 4
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: top
            layout: vertical
            bar_position: top
            badge_icon: mdi:alert
            grid_options:
              columns: 4
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: bottom
            layout: vertical
            bar_position: bottom
            badge_icon: mdi:alert
            grid_options:
              columns: 4
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: overlay
            layout: vertical
            bar_position: overlay
            badge_icon: mdi:alert
            grid_options:
              columns: 4
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: background
            layout: vertical
            bar_position: background
            badge_icon: mdi:alert
            grid_options:
              columns: 4
              rows: 2
      - type: grid
        cards:
          - type: heading
            heading: 'center_zero on a number keeps its own minimum'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: number.epb_demo_number
              center_zero: true
              ```
              A `number` brings its own range (`-50` to `10` here), and
              `center_zero` keeps its minimum when it already reaches below
              zero. In 1.6.3-rc9 the negative arm ran to `-100` instead.
              Check: `-10` fills a fifth of the negative arm on the first
              card, a tenth on the second, where `min_value: -100` is written.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: number.epb_demo_number
            name: own minimum
            center_zero: true
          - type: custom:entity-progress-card-dev
            entity: number.epb_demo_number
            name: 'min_value: -100'
            center_zero: true
            min_value: -100
      - type: grid
        cards:
          - type: heading
            heading: 'Multi row editor: min_value under center_zero'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-multi-card-dev
              center_zero: true
              max_value: 30
              entities:
                - entity: input_number.epb_demo_temperature
                - entity: input_number.epb_demo_temp_negative
                  theme: temperature
              ```
              A row's editor showed `-100` for `min_value` under
              `center_zero`, whatever the row actually drew from. Check: in
              the card editor, each row's pencil reads `-30` on the first
              row and `-50` (the theme's bottom) on the second.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-multi-card-dev
            center_zero: true
            max_value: 30
            entities:
              - entity: input_number.epb_demo_temperature
              - entity: input_number.epb_demo_temp_negative
                theme: temperature
      - type: grid
        cards:
          - type: heading
            heading: 'Multi Feature row: a Jinja hide applies, still no shape'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-multi-feature-dev
              entities:
                - entity: light.epb_demo_light
                  hide: "{{ ['icon'] if is_state('input_boolean.epb_demo_simple_mode', 'on') else [] }}"
                - entity: fan.epb_demo_fan
              ```
              A Feature row never draws the shape, and forcing that used to
              replace a Jinja `hide` with `[shape]`. Check: tapping the tile
              hides and brings back the light row's icon, and neither row
              ever shows a shape.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: tile
            entity: input_boolean.epb_demo_simple_mode
            features:
              - type: custom:entity-progress-multi-feature-dev
                entities:
                  - entity: light.epb_demo_light
                    hide: "{{ ['icon'] if is_state('input_boolean.epb_demo_simple_mode', 'on') else [] }}"
                  - entity: fan.epb_demo_fan
      - type: grid
        cards:
          - type: heading
            heading: '#140 — Template: a legacy watermark.high entity migrates'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-template-dev
              entity: input_number.epb_demo_battery
              name: 'Template: watermark.high as entity (regression #140)'
              percent: '{{ states(entity) }}'
              watermark:
                high: input_number.epb_demo_battery_reserved
                high_as: percent
                high_color: '#c6a445'
                type: line
              ```
              Template never migrated watermark's legacy forms, so an
              entity-sourced high was ignored. Check: the high line follows
              `input_number.epb_demo_battery_reserved`, in `#c6a445`.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-template-dev
            entity: input_number.epb_demo_battery
            name: 'Template: watermark.high as entity (regression #140)'
            percent: '{{ states(entity) }}'
            watermark:
              high: input_number.epb_demo_battery_reserved
              high_as: percent
              high_color: '#c6a445'
              type: line
      - type: grid
        cards:
          - type: heading
            heading: '#123 — compact_below falls back to default in vertical'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              name: 'compact_below → default (#123)'
              layout: vertical
              bar_position: compact_below
              grid_options:
                columns: 4
                rows: 2
              ```
              compact_below only has a shape in horizontal. Check: this
              vertical card draws the default placement, not a broken one.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'compact_below → default (#123)'
            layout: vertical
            bar_position: compact_below
            grid_options:
              columns: 4
              rows: 2
    subview: false
    cards: []
    badges:
      - type: custom:entity-progress-badge-template-dev
        entity: input_number.epb_demo_battery
        name: '#97'
        secondary: '{{ states(entity) }}%'
        percent: '{{ states(entity) }}'
      - type: custom:entity-progress-badge-template-dev
        entity: input_number.epb_demo_battery
        name: '#104'
        secondary: '{% if states(entity) | float < 20 %}low{% else %}ok{% endif %}'
        percent: '{{ states(entity) }}'
        color: '{% if states(entity) | float > 20 %}red{% else %}primary{% endif %}'
      - type: custom:entity-progress-badge-dev
        entity: input_number.epb_demo_battery
        name: '#124'
        min_width: 200px
    show_icon_and_title: true
  - title: EP Demo - Deprecated options
    icon: mdi:alert-outline
    path: epb-deprecated
    type: sections
    max_columns: 2
    sections:
      - type: grid
        cards:
          - type: heading
            heading: 'theme: battery/cpu/memory (deprecated aliases)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              theme: battery   # or: cpu | memory
              ```
              Each alias console-warns once and still renders with its
              modern equivalent (`battery` -> `optimal_when_high`,
              `cpu`/`memory` -> `optimal_when_low`). Migrate button should
              rewrite `theme:` in place.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'theme: battery'
            theme: battery
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'theme: cpu'
            theme: cpu
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'theme: memory'
            theme: memory
      - type: grid
        cards:
          - type: heading
            heading: 'max_value: <entity id> (bare string, pre-1.6)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              max_value: input_number.epb_demo_battery_reserved
              ```
              Migrated for the session to
              `max_value: { entity: input_number.epb_demo_battery_reserved }`.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'max_value: <entity id>'
            max_value: input_number.epb_demo_battery_reserved
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'max_value: <entity id> + max_value_attribute'
            max_value: sun.sun
            max_value_attribute: elevation
      - type: grid
        cards:
          - type: heading
            heading: >-
              watermark.low/high: <entity id> (bare string + low_attribute/
              high_attribute, early 1.6.0-rc)
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              watermark:
                low: input_number.epb_demo_battery_reserved
              ```
              Migrated for the session to
              `watermark.low: { entity: input_number.epb_demo_battery_reserved }`.
              Regression test for the "Migrate config" button not showing up
              for this specific form - fixed alongside this view, see
              CHANGELOG.md.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'watermark.low: <entity id>'
            watermark:
              low: input_number.epb_demo_battery_reserved
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'watermark.low: <entity id> + low_attribute'
            watermark:
              low: sun.sun
              low_attribute: elevation
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'watermark.high: <entity id>'
            watermark:
              high: input_number.epb_demo_battery_reserved
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'watermark.high: <entity id> + high_attribute'
            watermark:
              high: sun.sun
              high_attribute: elevation
      - type: grid
        cards:
          - type: heading
            heading: 'disable_unit: true (pre-1.6)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              disable_unit: true
              ```
              Migrated for the session to `hide: ['unit']`.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'disable_unit: true'
            disable_unit: true
      - type: grid
        cards:
          - type: heading
            heading: 'additions: [...] (bare list, pre-1.6)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_printer_ink_black
              additions:
                - entity: input_number.epb_demo_printer_ink_cyan
                - entity: input_number.epb_demo_printer_ink_magenta
              ```
              Migrated for the session to
              `bar_stack: { mode: proportional, entities: [...] }` - same
              renormalized values, segment order changes (main entity first
              instead of last, see docs/configuration.md#bar_stack).
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_printer_ink_black
            name: 'additions: [...]'
            additions:
              - entity: input_number.epb_demo_printer_ink_cyan
              - entity: input_number.epb_demo_printer_ink_magenta
      - type: grid
        cards:
          - type: heading
            heading: 'navigate_to / show_more_info (removed since v1.2.0)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              navigate_to: /lovelace/0   # or: show_more_info: true
              ```
              Both are pure no-ops now (console warning only) - no
              `tap_action` here on purpose, so tapping the card should do
              nothing at all. Migrate button just deletes the dead key,
              nothing to rewrite it to.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'navigate_to (inert)'
            navigate_to: /lovelace/0
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'show_more_info (inert)'
            show_more_info: true
      - type: grid
        cards:
          - type: heading
            heading: 'Combo - several legacy options on one card'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_printer_ink_black
              max_value: input_number.epb_demo_battery_reserved
              disable_unit: true
              additions:
                - entity: input_number.epb_demo_printer_ink_cyan
              ```
              Three independent legacy options at once. Check: three console
              warnings fire together, one Migrate config click rewrites all
              three in the same pass.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_printer_ink_black
            name: 'combo: max_value + disable_unit + additions'
            max_value: input_number.epb_demo_battery_reserved
            disable_unit: true
            additions:
              - entity: input_number.epb_demo_printer_ink_cyan
      - type: grid
        cards:
          - type: heading
            heading: 'show_value (Multi, pre-1.6.3)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-multi-card-dev
              show_value: true
              entities:
                - entity: input_number.epb_demo_printer_ink_black
              ```
              Back when a Multi row was a bare bar, `show_value` decided
              whether a value sat beside it. A row is a whole card now, so
              the key folds into `hide`: present at all adds `icon` and
              `name`, and `false` adds `secondary_info` on top. Check: one
              console warning, rows drawn without icon or name, and Migrate
              config rewrites the key as `hide`.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: heading
            heading: 'show_value: true'
            heading_style: subtitle
          - type: custom:entity-progress-multi-card-dev
            bar_size: xsmall
            show_value: true
            entities:
              - entity: input_number.epb_demo_printer_ink_black
                bar_color: black
              - entity: input_number.epb_demo_printer_ink_cyan
                bar_color: cyan
          - type: heading
            heading: 'show_value: false'
            heading_style: subtitle
          - type: custom:entity-progress-multi-card-dev
            bar_size: xsmall
            show_value: false
            entities:
              - entity: input_number.epb_demo_printer_ink_magenta
                bar_color: magenta
              - entity: input_number.epb_demo_printer_ink_yellow
                bar_color: yellow
      - type: grid
        cards:
          - type: heading
            heading: 'Migrate config on a Multi: shared level and row'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-multi-card-dev
              value_position: right
              disable_unit: true
              entities:
                - entity: input_number.epb_demo_battery
                  disable_unit: true
                - entity: input_number.epb_demo_temperature
              ```
              The button showed on a Multi and on its rows, then left these
              keys in place. Check: Migrate config in the card editor turns
              them into `reverse_secondary_info_row` and `hide: [unit]` and
              goes away; the first row's pencil does the same for its own
              `disable_unit`.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-multi-card-dev
            value_position: right
            disable_unit: true
            entities:
              - entity: input_number.epb_demo_battery
                disable_unit: true
              - entity: input_number.epb_demo_temperature
      - type: grid
        cards:
          - type: heading
            heading: 'watermark: disable_low / disable_high'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              name: 'watermark: disable_low + disable_high'
              watermark:
                low: 20
                high: 80
                disable_low: true
                disable_high: false
              ```
              Replaced by `low: false` / `high: false`. Check: no low
              line, the high one at 80; Migrate config writes `low: false`.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'watermark: disable_low + disable_high'
            watermark:
              low: 20
              high: 80
              disable_low: true
              disable_high: false
      - type: grid
        cards:
          - type: heading
            heading: 'text_shadow (replaced by text_effect)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: input_number.epb_demo_battery
              bar_position: overlay
              text_shadow: true
              ```
              Migrated to `text_effect: shadow`; `text_shadow: false` is
              dropped. Check: shadow rendered, deprecation warning, Migrate
              config writes `text_effect: shadow`.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'text_shadow: true'
            bar_position: overlay
            text_shadow: true
    show_icon_and_title: true
    cards: []
  - title: EP Demo - Cookbook examples
    icon: mdi:book-open-variant
    path: epb-cookbook-examples
    type: sections
    max_columns: 2
    sections:
      - type: grid
        cards:
          - type: heading
            heading: '🌅 Follow the sun (Cookbook - Template Card Power Features)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `follow-the-sun.gif`

              Dynamic name/color/countdown/percent, all from `sun.sun` -
              native entity, no helper needed. `sensor.sun_next_rising`/
              `sensor.sun_next_setting` need the extra Sun sensors enabled
              (Settings → Devices & services → Sun → entities) if they don't
              already show up.
              {% endraw %}
          - type: custom:entity-progress-card-template-dev
            name: >
              {% set sunrise = as_datetime(states('sensor.sun_next_rising')) %} {% set
              sunset = as_datetime(states('sensor.sun_next_setting')) %} {% set now_time =
              now() %} {% if sunrise and sunset %}
                {% if sunrise < sunset %}
                  Next Rise: {{ sunrise.timestamp() | timestamp_custom('%H:%M', true) }}
                {% else %}
                  Next Setting: {{ sunset.timestamp() | timestamp_custom('%H:%M', true) }}
                {% endif %}
              {% else %}
                Sun information not available
              {% endif %}
            entity: sun.sun
            fast_refresh: true
            bar_color: |
              {% if states('sun.sun') == 'below_horizon' %}
                lightgray
              {% else %}
                orange
              {% endif %}
            color: |
              {% if states('sun.sun') == 'below_horizon' %}
                none
              {% else %}
                orange
              {% endif %}
            secondary: >
              {% set sunrise = as_datetime(states('sensor.sun_next_rising')) %} {% set
              sunset = as_datetime(states('sensor.sun_next_setting')) %} {% set now_time =
              now() %} {% if sunrise and sunset %}
                {% if sunrise < sunset %}
                  {% set next_event = sunrise %}
                  {% set last_event = sunrise - timedelta(days=1) %}
                {% else %}
                  {% set next_event = sunset %}
                  {% set last_event = sunset - timedelta(days=1) %}
                {% endif %}
                {% set delta = next_event - now_time %}
                {% set total_seconds = delta.total_seconds() %}
                {% if total_seconds > 1 %}
                  {% set days = (total_seconds // 86400) | int %}
                  {% set hours = (total_seconds % 86400) // 3600 %}
                  {% set minutes = (total_seconds % 3600) // 60 %}
                  {% set seconds = (total_seconds % 60) %}
                  in
                  {% if days > 0 %}
                    {{ days }}d
                  {% endif %}
                  {{ '%02d:%02d:%02d' | format(hours | int, minutes | int, seconds | int) }}
                {% else %}
                  now
                {% endif %}
              {% else %}
                --:--:--
              {% endif %}
            percent: >
              {% set sunrise = as_datetime(states('sensor.sun_next_rising')) %} {% set
              sunset = as_datetime(states('sensor.sun_next_setting')) %} {% set now_time =
              now() %} {% if sunrise and sunset %}
                {% if sunrise < sunset %}
                  {% set next_event = sunrise %}
                  {% set last_event = sunrise - timedelta(days=1) %}
                {% else %}
                  {% set next_event = sunset %}
                  {% set last_event = sunset - timedelta(days=1) %}
                {% endif %}
                {% set total = (next_event - last_event).total_seconds() %}
                {% set elapsed = (now_time - last_event).total_seconds() %}
                {% if total > 0 %}
                  {{ ((elapsed / total) * 100) | round(2) }}
                {% else %}
                  0
                {% endif %}
              {% else %}
                0
              {% endif %}
            tap_action:
              action: more-info
            grid_options:
              columns: 6
              rows: 1
      - type: grid
        cards:
          - type: heading
            heading: '🎨 Basic usage (Cookbook - custom color/icon, no extras)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `rgb.png`

              The starting point for most cards - point at an entity,
              override icon/color to taste.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_printer_ink_black
            name: RVB
            icon: mdi:grain
            color: rgb(110, 65, 171)
            bar_color: rgb(110, 65, 171)
            icon_tap_action:
              action: more-info
      - type: grid
        cards:
          - type: heading
            heading: '🎨 Grid option + vertical layout (Cookbook - same card, different shape)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `rgb-vertical.png`

              Same card as above, `layout: vertical` and a 3x2
              `grid_options` footprint.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_printer_ink_black
            name: RVB
            icon: mdi:grain
            color: yellow
            bar_color: green
            icon_tap_action:
              action: more-info
            layout: vertical
            grid_options:
              columns: 3
              rows: 2
      - type: grid
        cards:
          - type: heading
            heading: '🐱 Litter box (Cookbook - min/max on a raw quantity)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `litter-box.png`

              ```yaml
              type: custom:entity-progress-card-dev
              entity: sensor.petkit_puramax_2_poids_litiere
              min_value: 6
              max_value: 12
              name: Litter
              theme: optimal_when_high
              ```
              Original Cookbook entity is a raw kg weight (6-12kg range), hence
              `min_value`/`max_value`. Our demo helper is already a 0-100%
              slider, so the live card below doesn't need them - same idea,
              different source unit.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_litter_level
            name: Litter
            theme: optimal_when_high
            grid_options:
              columns: 6
              rows: 1
      - type: grid
        cards:
          - type: heading
            heading: '🔋 Battery dashboard (Cookbook - auto-entities + device_class filter)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `battery-dashboard.png`

              A streamlined battery dashboard: `auto-entities` filters every
              `device_class: battery` sensor and generates one card per
              match, no per-entity config needed. `entity_id:
              sensor.epb_demo_*` keeps this demo scoped to its own 8
              battery sensors, not your real ones - drop that line to
              filter your whole Home Assistant instance instead.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:auto-entities
            filter:
              include:
                - entity_id: sensor.epb_demo_*
                  attributes:
                    device_class: battery
                  options:
                    type: custom:entity-progress-card-dev
                    entity: this.entity_id
                    theme: optimal_when_high
                    icon_tap_action:
                      action: more-info
            card:
              square: false
              type: grid
              columns: 2
            show_empty: true
            card_param: cards
            sort:
              method: state
              numeric: true
              ignore_case: false
      - type: grid
        cards:
          - type: heading
            heading: '🔌 Battery, charging (Cookbook - theme: battery_adaptive)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `battery-charging.gif`

              `battery_charging: true` on the entity drives both
              `theme: battery_adaptive` and `icon_animation:
              battery_charging` - `bar_color_mode: rainbow_full` shows the
              whole gradient at once.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: sensor.epb_demo_battery_95
            theme: battery_adaptive
            bar_color_mode: rainbow_full
            icon_animation: battery_charging
      - type: grid
        cards:
          - type: heading
            heading: '🎨 card_mod / animation (Cookbook - icon boing keyframes)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `rgb-loop.gif`

              `.icon`/`.shape` are exposed specifically so card_mod can
              target them for animations like this one.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_printer_ink_black
            name: RVB
            icon: mdi:grain
            color: rgb(110, 65, 171)
            bar_color: rgb(110, 65, 171)
            card_mod:
              style: |-
                .icon {
                  animation: boing 3s ease infinite;
                  transform-origin: 50% 90%;
                }
                @keyframes boing {
                  0% { transform: scale3d(1, 1, 1); }
                  7% { transform: scale3d(1.25, 0.75, 1); }
                  10% { transform: scale3d(0.75, 1.25, 1); }
                  12% { transform: scale3d(1.15, 0.85, 1); }
                  16% { transform: scale3d(0.95, 1.05, 1); }
                  19% { transform: scale3d(1.05, 0.95, 1); }
                  25% { transform: scale3d(1, 1, 1); }
                }
      - type: grid
        cards:
          - type: heading
            heading: '📚 vertical-stack-in-card (Cookbook - auto-entities + frameless)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `stack.gif`

              Same `auto-entities`/`device_class: battery` filter as above,
              wrapped in `vertical-stack-in-card` for a cohesive group, with
              `frameless` stripping the border/shadow for a seamless look.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:vertical-stack-in-card
            cards:
              - type: custom:auto-entities
                filter:
                  include:
                    - entity_id: sensor.epb_demo_*
                      attributes:
                        device_class: battery
                      options:
                        type: custom:entity-progress-card-dev
                        entity: this.entity_id
                        theme: battery_adaptive
                        bar_color_mode: rainbow
                        icon_animation: battery_charging
                        icon_tap_action:
                          action: more-info
                        frameless: true
                sort:
                  method: state
                  numeric: true
                  ignore_case: false
                card:
                  square: false
                  type: grid
                  columns: 2
                card_param: cards
          - type: heading
            heading: 'Same, with bar_aligned: batteries'
            heading_style: subtitle
            grid_options:
              columns: full
          - type: custom:vertical-stack-in-card
            cards:
              - type: custom:auto-entities
                filter:
                  include:
                    - entity_id: sensor.epb_demo_*
                      attributes:
                        device_class: battery
                      options:
                        type: custom:entity-progress-card-dev
                        entity: this.entity_id
                        theme: battery_adaptive
                        bar_color_mode: rainbow
                        icon_animation: battery_charging
                        icon_tap_action:
                          action: more-info
                        frameless: true
                        bar_aligned: batteries
                sort:
                  method: state
                  numeric: true
                  ignore_case: false
                card:
                  square: false
                  type: grid
                  columns: 2
                card_param: cards
      - type: grid
        cards:
          - type: heading
            heading: '📦 vertical-stack (Cookbook - Tile + Entity Progress Card combo)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `vertical-stack.png`

              Native `vertical-stack`, no custom card needed - stacks a
              `tile` and an `entity-progress-card` on the same entity into
              one cohesive block.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: vertical-stack
            cards:
              - type: tile
                entity: input_number.epb_demo_battery
                name: Tile
                vertical: false
                features_position: bottom
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_battery
                layout: horizontal
                bar_size: small
            title: Vertical stack
      - type: grid
        cards:
          - type: heading
            heading: '🧱 Native containers — entities (Cookbook)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `native-entities.png`

              A plain HA `entities` card can hold an `entity-progress-card`
              right alongside a regular entity row - no wrapper needed.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: entities
            title: entities
            entities:
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_battery
                layout: horizontal
                bar_size: small
              - entity: sensor.sun_next_setting
      - type: grid
        cards:
          - type: heading
            heading: '🧱 Native containers — grid (Cookbook)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `native-grid.png`

              Same idea with a native `grid` card - `marginless`/
              `frameless` fuse the cells into a single seamless block.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - square: false
            type: grid
            cards:
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_printer_ink_black
                custom_info: ↓
                bar_color: black
                hide:
                  - name
                  - icon
                marginless: true
                frameless: true
                height: auto
                decimal: 0
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_printer_ink_cyan
                custom_info: ↓
                bar_color: cyan
                hide:
                  - name
                  - icon
                marginless: true
                frameless: true
                height: auto
                decimal: 0
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_printer_ink_magenta
                custom_info: ↓
                bar_color: magenta
                hide:
                  - name
                  - icon
                marginless: true
                frameless: true
                height: auto
                decimal: 0
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_printer_ink_yellow
                custom_info: ↓
                bar_color: yellow
                hide:
                  - name
                  - icon
                marginless: true
                frameless: true
                height: auto
                decimal: 0
            grid_options:
              columns: full
              rows: auto
            columns: 2
            title: Grid Card
      - type: grid
        cards:
          - type: heading
            heading: '🧱 Native containers — height override (Cookbook)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `native-height-override.png`

              `height` wins outright inside any aggregation - set it
              explicitly to break out of the container's own sizing.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: entities
            title: entities
            entities:
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_battery
                name: default (no height)
                layout: horizontal
                bar_size: small
              - type: custom:entity-progress-card-dev
                entity: input_number.epb_demo_battery
                name: 100px
                layout: horizontal
                bar_size: small
                height: 100px
      - type: grid
        cards:
          - type: heading
            heading: '🚨 Pulsing alert on threshold (Cookbook - alert_when, no template)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `alert-pulsing.gif`

              The card reacts on its own past a threshold - no separate
              condition to write. `above: 80` on the fixed disk-usage sensor
              (95% by default, so this is active out of the box).
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: heading
            heading: ''
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: sensor.epb_demo_disk_usage
            name: Disk Usage (demo)
            icon: mdi:harddisk
            theme: critical_when_high
            alert_when:
              above: 80
              color: red
              highlight: border
              animation: ping
      - type: grid
        cards:
          - type: heading
            heading: '🔌 Three circuits, one bar (Cookbook - bar_stack: proportional)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `bar-stack-circuits.png`

              Three separate circuits sharing one breaker budget - each
              entity's own draw, proportionally combined toward the shared
              3000W max.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_circuit_kitchen
            name: Total Load (demo)
            max_value: 3000
            decimal: 0
            bar_color: '#FF4D6D'
            bar_stack:
              mode: proportional
              entities:
                - entity: input_number.epb_demo_circuit_living_room
                  color: '#FFB703'
                - entity: input_number.epb_demo_circuit_garage
                  color: '#06D6A0'
      - type: grid
        cards:
          - type: heading
            heading: '🔋 Badge with theme + bar effect (Cookbook - dressed up for a header view)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `badge-shimmer.gif`

              Same idea as a plain badge, with `theme` and `bar_effect:
              shimmer` added. Badges live in the view's own badges row (top
              of the dashboard, not mixed in with cards) - see it there.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
      - type: grid
        cards:
          - type: heading
            heading: '🖴 Badge Template color escalation (Cookbook - three-way severity in Jinja)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `disk-usage.png`

              No `custom_theme` needed - the color itself is computed
              inline. Badges live in the view's own badges row (top of the
              dashboard, not mixed in with cards) - see it there.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
      - type: grid
        cards:
          - type: heading
            heading: '🧺 The Laundry Mystery (Cookbook - Power Features, reference only)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              Not runnable here (needs a real washing machine integration) -
              exact recipe from the Cookbook, badge_icon/badge_color/name_info
              all driven by the same `sensor.washing_machine_operation_state`.
              ```yaml
              type: custom:entity-progress-card-dev
              entity: sensor.washing_machine_progress_current_percentage
              name: Washing Machine
              color: primary
              tap_action:
                action: more-info
              icon_tap_action:
                action: more-info
              bar_color: primary
              bar_size: large
              badge_icon: >-
                {% if states('sensor.washing_machine_operation_state') == 'run'
                %}mdi:power-on{% else %}mdi:power-off {% endif %}
              badge_color: >-
                {% if states('sensor.washing_machine_operation_state') == 'run' %} blue {%
                else %} disabled {% endif %}
              name_info: >-
                {% if has_value('sensor.washing_machine_remaining_program_time') %} ready at
                {{ as_timestamp( states('sensor.washing_machine_remaining_program_time') ) |
                timestamp_custom('%H:%M', true) }}{% endif %}
              ```
              Full write-up: [Cookbook - The Laundry
              Mystery](https://github.com/francois-le-ko4la/lovelace-entity-progress-card/blob/main/docs/cookbook.md#laundry-mystery).
              {% endraw %}
            grid_options:
              columns: 12
              rows: 3
      - type: grid
        cards:
          - type: heading
            heading: >-
              🧺 Washing Machine Progress: Three Brands (Cookbook - Power
              Features, reference only)
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              Not runnable here (brand-specific integrations) - three
              verified approaches depending on what your washer's
              integration actually exposes.

              **Home Connect (Bosch/Siemens)** - direct, no extra config:
              ```yaml
              type: custom:entity-progress-card-dev
              entity: sensor.washing_machine_program_progress
              name: Washing Machine
              ```

              **Miele** - Jinja `max_value`, no helper needed:
              ```yaml
              type: custom:entity-progress-card-dev
              entity: sensor.washing_machine_elapsed_time
              unit: '%'
              max_value:
                jinja: >
                  {{ (states('sensor.washing_machine_elapsed_time') | float(0))
                     + (states('sensor.washing_machine_remaining_time') | float(0)) }}
              ```

              **Samsung (SmartThings)** - only `machine_state`/`job_state`/
              `completion_time`, no elapsed/remaining time: needs an
              `input_datetime` helper + automation to anchor a start time
              first, then the same technique as the next card below. Full
              write-up: [Cookbook - Washing Machine Progress](https://github.com/francois-le-ko4la/lovelace-entity-progress-card/blob/main/docs/cookbook.md#washing-machine-three-brands).
              {% endraw %}
            grid_options:
              columns: 12
              rows: 4
      - type: grid
        cards:
          - type: heading
            heading: >-
              🖨️ Cracking a Complex Case with a Simple Helper (Cookbook - Power
              Features, reference only)
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              Not runnable here (needs a real print job's start/end time
              entities) - a Template helper (Number) computes the total
              duration from start/end timestamps, then feeds it straight into
              `max_value` as an entity reference:
              ```yaml
              type: custom:entity-progress-card-dev
              entity: sensor.print_puppy_remaining_time
              max_value: number.totaldurationofthetask
              decimal: 0
              bar_color: green
              icon: mdi:clock-end
              ```
              Full write-up (helper template + math model): [Cookbook -
              Cracking a Complex
              Case](https://github.com/francois-le-ko4la/lovelace-entity-progress-card/blob/main/docs/cookbook.md#simple-helper).
              {% endraw %}
            grid_options:
              columns: 12
              rows: 3
      - type: grid
        cards:
          - type: heading
            heading: "🔒 Don't Let It Expire! (Cookbook - Power Features, reference only)"
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              Not runnable here (needs a real cert-monitoring sensor) - a
              color-coded countdown to SSL certificate expiry. The Cookbook
              covers two approaches: a `command_line` sensor (fully custom,
              more portable dependency-wise) and the built-in `cert_expiry`
              integration (recommended - the epilogue explains why):
              ```yaml
              type: custom:entity-progress-card-dev
              entity: number.cert_expiry_entity_id
              name: SSL Certificate Expiry
              icon: mdi:certificate
              decimal: 0
              bar_orientation: rtl
              custom_theme:
                - min: 0
                  max: 10
                  color: red
                - min: 10
                  max: 20
                  color: yellow
                - min: 20
                  max: 90
                  color: green
              unit: '%'
              state_content: state
              ```
              Full write-up: [Cookbook - Don't Let It
              Expire](https://github.com/francois-le-ko4la/lovelace-entity-progress-card/blob/main/docs/cookbook.md#ssl-expiry).
              {% endraw %}
            grid_options:
              columns: 12
              rows: 4
      - type: grid
        cards:
          - type: heading
            heading: '🧩 Template Card simple example (Cookbook - icon/badge/percent/color in Jinja)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `template-card-simple.png`

              Every visual property computed from the same entity's state -
              no `entity:` reads needed, it's all Jinja.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-template-dev
            entity: light.epb_demo_light
            icon: |-
              {% if states('light.epb_demo_light') == 'on' %}
                mdi:ab-testing
              {% else %}
                mdi:abacus
              {% endif %}
            name: "{{ state_attr('light.epb_demo_light', 'friendly_name') }}"
            secondary: "{{ states('light.epb_demo_light') }}"
            badge_icon: |-
              {% if states('light.epb_demo_light') == 'on' %}
                mdi:ab-testing
              {% else %}
                mdi:library
              {% endif %}
            badge_color: |-
              {% if states('light.epb_demo_light') == 'on' %}
                green
              {% else %}
                grey
              {% endif %}
            percent: |-
              {% if states('light.epb_demo_light') == 'on' %}
                {{ (state_attr('light.epb_demo_light', 'brightness') | float * 100 / 255) | round(2) }}
              {% else %}
                0
              {% endif %}
            color: |-
              {% if states('light.epb_demo_light') == 'on' %}
                orange
              {% else %}
                grey
              {% endif %}
            bar_color: |-
              {% if states('light.epb_demo_light') == 'on' %}
                yellow
              {% else %}
                red
              {% endif %}
            watermark:
              low: 10
      - type: grid
        cards:
          - type: heading
            heading: '🧩 Badge simple example (Cookbook - entity/name/decimal/icon)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `kitchen-fan.png`

              Badges live in the view's own badges row (top of the
              dashboard, not mixed in with cards) - see it there.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
      - type: grid
        cards:
          - type: heading
            heading: '🧩 Badge Template simple example (Cookbook - icon/name/secondary/percent in Jinja)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `demo-light.png`

              Badges live in the view's own badges row (top of the
              dashboard, not mixed in with cards) - see it there.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
      - type: grid
        cards:
          - type: heading
            heading: '🧩 Tile Feature simple example (Cookbook - bare bar, no frame)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `tile-feature-simple.png`
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: tile
            entity: input_number.epb_demo_battery
            features:
              - type: custom:entity-progress-feature-dev
                entity: input_number.epb_demo_battery
      - type: grid
        cards:
          - type: heading
            heading: '🧩 Tile Feature overlay mode (Cookbook - bar_position: bottom)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `tile-feature-overlay.png`
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: tile
            entity: input_number.epb_demo_battery
            features:
              - type: custom:entity-progress-feature-dev
                entity: input_number.epb_demo_battery
                bar_position: bottom
                theme: optimal_when_high
                bar_color_mode: segment
                watermark:
                  type: striped
                  opacity: 0.4
                  low:
                    value: 20
                    color: white
                  high:
                    value: 80
                    color: white
      - type: grid
        cards:
          - type: heading
            heading: '🧩 Multi-Card standalone (Cookbook - entity-progress-multi-card)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `multi-card-standalone.png`
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-multi-card-dev
            hide:
              - icon
              - name
            bar_size: small
            decimal: 0
            entities:
              - entity: input_number.epb_demo_printer_ink_black
                bar_color: black
              - entity: input_number.epb_demo_printer_ink_cyan
                bar_color: cyan
              - entity: input_number.epb_demo_printer_ink_magenta
                bar_color: magenta
              - entity: input_number.epb_demo_printer_ink_yellow
                bar_color: yellow
            grid_options:
              rows: 3
      - type: grid
        cards:
          - type: heading
            heading: '🧩 Multi-Feature inside a Tile card (Cookbook - entity-progress-multi-feature)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `multi-feature-tile.png`
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: tile
            entity: input_boolean.epb_demo_printer
            features:
              - type: custom:entity-progress-multi-feature-dev
                hide:
                  - icon
                  - name
                  - value
                bar_size: xsmall
                entities:
                  - entity: input_number.epb_demo_printer_ink_black
                    bar_color: black
                  - entity: input_number.epb_demo_printer_ink_cyan
                    bar_color: cyan
                  - entity: input_number.epb_demo_printer_ink_magenta
                    bar_color: magenta
                  - entity: input_number.epb_demo_printer_ink_yellow
                    bar_color: yellow
      - type: grid
        cards:
          - type: heading
            heading: '✨ bar_effect: shimmer (Cookbook - visual effects)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `effect-shimmer.gif`
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: sensor.epb_demo_battery_ev
            theme: critical_when_low
            bar_effect:
              - shimmer
      - type: grid
        cards:
          - type: heading
            heading: '✨ bar_effect: wave (Cookbook - visual effects)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `effect-wave.gif`
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            bar_position: background
            bar_orientation: up
            bar_effect:
              - wave
            grid_options:
              columns: 6
              rows: 2
      - type: grid
        cards:
          - type: heading
            heading: '✨ bar_segments (Cookbook - visual effects)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `effect-bar-segments.png`
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            bar_segments: 10
      - type: grid
        cards:
          - type: heading
            heading: '✨ bar_ring (Cookbook - visual effects)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `effect-bar-ring.png`
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: sensor.epb_demo_battery_ev
            name: 'start 225 · gap 90'
            bar_position: icon
            bar_ring:
              start: 225
              gap: 90
            grid_options:
              columns: 6
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: sensor.epb_demo_battery_ev
            name: '+ bar_segments: 5'
            bar_position: icon
            bar_segments: 5
            bar_ring:
              start: 225
              gap: 90
            grid_options:
              columns: 6
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: sensor.epb_demo_battery_ev
            name: 'softness: 0'
            bar_position: icon
            bar_size: xlarge
            bar_ring:
              softness: 0
            grid_options:
              columns: 6
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: sensor.epb_demo_battery_ev
            name: 'softness: 4'
            bar_position: icon
            bar_size: xlarge
            bar_ring:
              softness: 4
            grid_options:
              columns: 6
              rows: 1
      - type: grid
        cards:
          - type: heading
            heading: '✨ interpolate (Cookbook - visual effects)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `effect-interpolate.png`
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_litter_level
            interpolate: true
            custom_theme:
              - min: 0
                max: 50
                color: red
              - min: 50
                max: 100
                color: green
      - type: grid
        cards:
          - type: heading
            heading: '✨ force_circular_background (Cookbook - visual effects)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `effect-force-circular-background.png`
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: timer.epb_demo_timer
            force_circular_background: true
      - type: grid
        cards:
          - type: heading
            heading: '✨ icon_animation: washing_machine / battery_charging / spin / ping (Cookbook - visual effects)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `effect-icon-animation.gif`
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: timer.epb_demo_timer
            icon: mdi:washing-machine
            icon_animation: washing_machine
          - type: custom:entity-progress-card-dev
            entity: sensor.epb_demo_battery_ev
            icon_animation: battery_charging
          - type: custom:entity-progress-card-dev
            entity: fan.epb_demo_fan
            icon_animation: spin
          - type: custom:entity-progress-card-dev
            entity: light.epb_demo_light
            icon_animation: ping
      - type: grid
        cards:
          - type: heading
            heading: '✨ alert_when: label + entity-driven + Jinja + blink (Cookbook - visual effects)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `effect-alert-label.gif`
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: Label
            alert_when:
              above: 20
              color: red
              highlight: label
              label: 'HIGH'
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_hot
            name: Entity threshold
            alert_when:
              above:
                entity: input_number.epb_demo_temperature
              color: red
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: Jinja override
            alert_when:
              jinja: >-
                {% set t = states('input_number.epb_demo_temperature') | float
                %} {% if t > 30 %}{{ {'color': 'red', 'animation': 'ping'} }}
                {% elif t > 20 %}{{ {'color': 'orange'} }} {% else %}false{%
                endif %}
              color: red
              animation: static
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: Blink background
            alert_when:
              below: 25
              color: orange
              highlight: background
              animation: blink
      - type: grid
        cards:
          - type: heading
            heading: '✨ watermark: striped (Cookbook - visual effects)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `effect-watermark.png`
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            watermark:
              type: striped
              low:
                value: 20
                color: red
              high:
                value: 80
                color: green
      - type: grid
        cards:
          - type: heading
            heading: '✨ bar_color_mode: segment (Cookbook - visual effects)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `effect-segment.png`
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: segment
            theme: temperature
            max_value: 40
            bar_color_mode: segment
      - type: grid
        cards:
          - type: heading
            heading: '✨ bar_color_mode: rainbow_full (Cookbook - visual effects)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `effect-rainbow-full.png`
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: rainbow_full
            theme: temperature
            max_value: 40
            bar_color_mode: rainbow_full
      - type: grid
        cards:
          - type: heading
            heading: '✨ status_label: glacial → scorching (Cookbook - visual effects)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `effect-status-label.png`

              Established weather-report terms instead of a plain cold/hot
              split, still just a Jinja condition on the value - no zone
              list to keep in sync with the theme.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_negative
            name: negative
            theme: temperature
            center_zero: true
            min_value: -20
            max_value: 40
            status_label:
              jinja: >-
                {% set t = states('input_number.epb_demo_temp_negative') |
                float %} {% if t < -5 %}glacial {% elif t < 5 %}cold {% elif t
                < 15 %}cool {% elif t < 25 %}temperate {% elif t < 32 %}warm
                {% else %}scorching {% endif %}
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_positive
            name: positive
            theme: temperature
            max_value: 40
            status_label:
              jinja: >-
                {% set t = states('input_number.epb_demo_temp_positive') |
                float %} {% if t < -5 %}glacial {% elif t < 5 %}cold {% elif t
                < 15 %}cool {% elif t < 25 %}temperate {% elif t < 32 %}warm
                {% else %}scorching {% endif %}
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_temperate
            name: temperate
            theme: temperature
            max_value: 40
            status_label:
              jinja: >-
                {% set t = states('input_number.epb_demo_temp_temperate') |
                float %} {% if t < -5 %}glacial {% elif t < 5 %}cold {% elif t
                < 15 %}cool {% elif t < 25 %}temperate {% elif t < 32 %}warm
                {% else %}scorching {% endif %}
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_hot
            name: hot
            theme: temperature
            max_value: 40
            status_label:
              jinja: >-
                {% set t = states('input_number.epb_demo_temp_hot') | float
                %} {% if t < -5 %}glacial {% elif t < 5 %}cold {% elif t < 15
                %}cool {% elif t < 25 %}temperate {% elif t < 32 %}warm {%
                else %}scorching {% endif %}
      - type: grid
        cards:
          - type: heading
            heading: '✨ trend_indicator (Cookbook - visual effects)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `effect-trend.png`
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            trend_indicator: true
      - type: grid
        cards:
          - type: heading
            heading: '✨ peak_marker (Cookbook - visual effects)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `effect-peak-marker.png`
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            peak_marker:
              window: 2h
              min: cyan
              max: magenta
              average:
                type: round
                color: yellow
      - type: grid
        cards:
          - type: heading
            heading: '✨ custom_theme (Cookbook - visual effects)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `effect-custom-theme.png`
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_litter_level
            custom_theme:
              - min: 0
                max: 20
                color: red
                icon: mdi:water-alert
              - min: 20
                max: 60
                color: orange
                icon: mdi:water-minus
              - min: 60
                max: 100
                color: green
                icon: mdi:water-check
      - type: grid
        cards:
          - type: heading
            heading: '✨ bar_stack: stacked / net (Cookbook - visual effects)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `effect-bar-stack.png`
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: 'bar_stack: stacked'
            bar_stack:
              entities:
                - entity: input_number.epb_demo_battery_reserved
                  color: orange
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_grid_consumption
            name: 'bar_stack: net'
            min_value: -3000
            max_value: 3000
            center_zero: true
            bar_stack:
              mode: net
              entities:
                - entity: input_number.epb_demo_solar_production
                  subtract: true
      - type: grid
        cards:
          - type: heading
            heading: '✨ center_zero (Cookbook - visual effects)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `effect-center-zero.png`
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_power
            center_zero: true
            min_value: -3000
            max_value: 3000
      - type: grid
        cards:
          - type: heading
            heading: '✨ hide: [shape] (Cookbook - visual effects)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `effect-hide-shape.png`
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            hide:
              - shape
      - type: grid
        cards:
          - type: heading
            heading: '✨ density: compact (Cookbook - visual effects)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `effect-density-compact.png`
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: horizontal
            density: compact
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: vertical
            density: compact
            layout: vertical
      - type: grid
        cards:
          - type: heading
            heading: '🔢 unit_position: currency-style values (Cookbook - display formatting)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `format-unit-position.png`
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: Litecoin
            icon: mdi:litecoin
            unit: Ł
            unit_position: before
            unit_spacing: no-space
      - type: grid
        cards:
          - type: heading
            heading: '🔢 value_compact: abbreviate large numbers (Cookbook - display formatting)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `format-value-compact.png`
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_total_energy
            value_compact: true
            unit_spacing: no-space
      - type: grid
        cards:
          - type: heading
            heading: '🔢 value_sign: force an explicit +/- (Cookbook - display formatting)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `format-value-sign.png`
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: sensor.epb_demo_energy_net
            center_zero: true
            min_value: -3000
            max_value: 3000
            value_sign: true
      - type: grid
        cards:
          - type: heading
            heading: '🌟 Recreate the Showcase: Living room (Cookbook)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `showcase-living-room.png`
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: Living room
            theme: temperature
            bar_color_mode: rainbow_full
            center_zero: true
            min_value: -50
            max_value: 100
            bar_size: xlarge
            status_label:
              jinja: Temperate
            grid_options:
              columns: 12
      - type: grid
        cards:
          - type: heading
            heading: '🌟 Recreate the Showcase: Garage (Cookbook)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `showcase-garage.gif`
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temp_hot
            theme: temperature
            layout: vertical
            alert_when:
              above: 30
              color: red
              highlight: label
              label: hot
              animation: ping
            name: Garage
            bar_position: default
            bar_size: small
            max_value: 40
            decimal: 1
            bar_color_mode: rainbow_full
      - type: grid
        cards:
          - type: heading
            heading: '🌟 Recreate the Showcase: Energy (Cookbook)'
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              📁 `showcase-energy.png`
              {% endraw %}
            grid_options:
              columns: 12
              rows: 1
          - type: tile
            entity: sensor.epb_demo_energy_net
            icon: mdi:transmission-tower
            name: Energy (consumption vs production)
            features:
              - type: custom:entity-progress-multi-feature-dev
                hide:
                  - icon
                  - name
                bar_size: medium
                decimal: 0
                entities:
                  - entity: input_number.epb_demo_grid_consumption
                    bar_color: blue
                    max_value: 3000
                  - entity: input_number.epb_demo_solar_production
                    bar_color: green
                    max_value: 3000
              - type: custom:entity-progress-feature-dev
                entity: input_number.epb_demo_solar_production
                center_zero: true
                min_value: -3000
                max_value: 3000
                bar_color: green
                bar_stack:
                  mode: net
                  entities:
                    - entity: input_number.epb_demo_grid_consumption
                      subtract: true
                      color: blue
            grid_options:
              columns: 12
    badges:
      - type: custom:entity-progress-badge-dev
        entity: input_number.epb_demo_battery
        theme: optimal_when_high
        bar_effect: shimmer
      - type: custom:entity-progress-badge-template-dev
        entity: sensor.epb_demo_disk_usage
        icon: mdi:harddisk
        name: "{{ state_attr('sensor.epb_demo_disk_usage', 'friendly_name') }}"
        secondary: "{{ states('sensor.epb_demo_disk_usage') }}%"
        percent: "{{ states('sensor.epb_demo_disk_usage') | float(0) }}"
        color: |-
          {% set v = states('sensor.epb_demo_disk_usage') | float(0) %}
          {% if v > 90 %}
            red
          {% elif v > 75 %}
            orange
          {% else %}
            green
          {% endif %}
      - type: custom:entity-progress-badge-dev
        entity: input_number.epb_demo_battery
        name: Kitchen
        decimal: 1
        icon: mdi:air-conditioner
      - type: custom:entity-progress-badge-template-dev
        entity: light.epb_demo_light
        icon: |-
          {% if states('light.epb_demo_light') == 'on' %}
            mdi:ab-testing
          {% else %}
            mdi:abacus
          {% endif %}
        name: "{{ state_attr('light.epb_demo_light', 'friendly_name') }}"
        secondary: "{{ states('light.epb_demo_light') }}"
        percent: |-
          {% if states('light.epb_demo_light') == 'on' %}
            {{ (state_attr('light.epb_demo_light', 'brightness') | float * 100 / 255) | round(2) }}
          {% else %}
            0
          {% endif %}
    show_icon_and_title: true
    cards: []
  - title: EP Demo - Examples
    icon: mdi:chemical-weapon
    path: epb-demo-examples
    type: sections
    max_columns: 2
    show_icon_and_title: true
    sections:
      - type: grid
        cards:
          - type: heading
            heading: Battery
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:auto-entities
              filter:
                include:
                  - attributes:
                      device_class: battery
                    options:
                      type: custom:entity-progress-card-dev
                      theme: battery_adaptive
                      bar_color_mode: rainbow
                      icon_animation: battery_charging
              ```
              `auto-entities` (a separate HACS card) discovers every
              `device_class: battery` entity and renders one
              `entity-progress-card` per match - `theme: battery_adaptive`
              reacts to charging state on its own.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:auto-entities
            filter:
              include:
                - entity_id: sensor.epb_demo_*
                  attributes:
                    device_class: battery
                  options:
                    type: custom:entity-progress-card-dev
                    entity: this.entity_id
                    theme: battery_adaptive
                    bar_color_mode: rainbow
                    icon_animation: battery_charging
                    icon_tap_action:
                      action: more-info
            card:
              square: false
              type: grid
              columns: 2
            show_empty: true
            card_param: cards
            sort:
              method: state
              numeric: true
              ignore_case: false
      - type: grid
        cards:
          - type: heading
            heading: Printer (#126 / @EDelsman)
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: tile
              entity: input_boolean.epb_demo_printer
              features:
                - type: custom:entity-progress-multi-feature-dev
                  hide:
                    - icon
                    - name
                    - value
                  entities:
                    - entity: input_number.epb_demo_printer_ink_black
                      bar_color: black
                    # ...one entry per cartridge
              ```
              Real-world use case from issue #126 - one row per ink
              cartridge, stacked with `entity-progress-multi-feature` under
              a single Tile.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: tile
            grid_options:
              min_columns: 4
              columns: 6
              rows: 2
            entity: input_boolean.epb_demo_printer
            name: 'Multi-feature use case: printer ink levels'
            features:
              - type: custom:entity-progress-multi-feature-dev
                hide:
                  - icon
                  - name
                  - value
                bar_size: xsmall
                entities:
                  - entity: input_number.epb_demo_printer_ink_black
                    bar_color: black
                  - entity: input_number.epb_demo_printer_ink_cyan
                    bar_color: cyan
                  - entity: input_number.epb_demo_printer_ink_magenta
                    bar_color: magenta
                  - entity: input_number.epb_demo_printer_ink_yellow
                    bar_color: yellow
          - type: heading
            heading: Sunset (#60 / @Duncan1106)
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-template-dev
              entity: sun.sun
              name: "{{ ... next rise/set time ... }}"
              percent: "{{ ... % elapsed of the current day/night ... }}"
              fast_refresh: true
              ```
              Real-world use case from issue #60 - `name`/`color`/
              `bar_color`/`secondary`/`percent` all computed from `sun.sun`
              plus its `sensor.sun_next_rising`/`sun_next_setting`, with
              `fast_refresh` keeping the countdown ticking every second.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-template-dev
            entity: sun.sun
            name: >
              {% set sunrise = as_datetime(states('sensor.sun_next_rising')) %}
              {% set sunset = as_datetime(states('sensor.sun_next_setting')) %}
              {% if sunrise and sunset %}
                {% if sunrise < sunset %}
                  Next Rise: {{ sunrise.timestamp() | timestamp_custom('%H:%M', true) }}
                {% else %}
                  Next Setting: {{ sunset.timestamp() | timestamp_custom('%H:%M', true) }}
                {% endif %}
              {% else %}
                Suninformation not available
              {% endif %}
            bar_color: |
              {% if states('sun.sun') == 'below_horizon' %}
                lightgray
              {% else %}
                orange
              {% endif %}
            color: |
              {% if states('sun.sun') == 'below_horizon' %}
                none
              {% else %}
                orange
              {% endif %}
            secondary: >
              {% set sunrise = as_datetime(states('sensor.sun_next_rising')) %}
              {% set sunset = as_datetime(states('sensor.sun_next_setting')) %}
              {% set now_time = now() %} {% if sunrise and sunset %}
                {% if sunrise < sunset %}
                  {% set next_event = sunrise %}
                  {% set last_event = sunrise - timedelta(days=1) %}
                {% else %}
                  {% set next_event = sunset %}
                  {% set last_event = sunset - timedelta(days=1) %}
                {% endif %}
                {% set delta = next_event - now_time %}
                {% set total_seconds = delta.total_seconds() %}
                {% if total_seconds > 1 %}
                  {% set days = (total_seconds // 86400) | int %}
                  {% set hours = (total_seconds % 86400) // 3600 %}
                  {% set minutes = (total_seconds % 3600) // 60 %}
                  {% set seconds = (total_seconds % 60) %}
                  in
                  {% if days > 0 %}
                    {{ days }}d
                  {% endif %}
                  {{ '%02d:%02d:%02d' | format(hours | int, minutes | int, seconds | int) }}
                {% else %}
                  now
                {% endif %}
              {% else %}
                --:--:--
              {% endif %}
            percent: >
              {% set sunrise = as_datetime(states('sensor.sun_next_rising')) %}
              {% set sunset = as_datetime(states('sensor.sun_next_setting')) %}
              {% set now_time = now() %} {% if sunrise and sunset %}
                {% if sunrise < sunset %}
                  {% set next_event = sunrise %}
                  {% set last_event = sunrise - timedelta(days=1) %}
                {% else %}
                  {% set next_event = sunset %}
                  {% set last_event = sunset - timedelta(days=1) %}
                {% endif %}
                {% set total = (next_event - last_event).total_seconds() %}
                {% set elapsed = (now_time - last_event).total_seconds() %}
                {% if total > 0 %}
                  {{ ((elapsed / total) * 100) | round(2) }}
                {% else %}
                  0
                {% endif %}
              {% else %}
                0
              {% endif %}
            tap_action:
              action: more-info
            fast_refresh: true
            grid_options:
              columns: 12
              rows: 1
          - type: heading
            heading: 'Sunset - alternate version (@WarC0zes, HACF)'
            heading_style: title
          - type: custom:entity-progress-card-template-dev
            entity: sun.sun
            height: 45px
            bar_size: medium
            bar_effect: radius
            name: >
              {% set sunrise = as_datetime(states('sensor.sun_next_rising')) %} {% set
              sunset = as_datetime(states('sensor.sun_next_setting')) %} {% set now_time
              = now() %} {% if sunrise and sunset %}
                {% if sunrise < sunset %}
                  Soleil sous l'horizon | Prochain lever: {{ sunrise.timestamp() | timestamp_custom('%Hh%M', true) }}
                {% else %}
                  Soleil au-dessus de l'horizon | Prochain coucher: {{ sunset.timestamp() | timestamp_custom('%Hh%M', true) }}
                {% endif %}
              {% else %}
                Sun information pas disponible
              {% endif %}
            bar_color: |
              {% if states('sun.sun') == 'below_horizon' %}
                #40445a
              {% else %}
                yellow
              {% endif %}
            color: |
              {% if states('sun.sun') == 'below_horizon' %}
                #40445a
              {% else %}
                yellow
              {% endif %}
            secondary: >
              {% set sunrise = as_datetime(states('sensor.sun_next_rising')) %} {% set
              sunset = as_datetime(states('sensor.sun_next_setting')) %} {% set now_time
              = now() %} {% if sunrise and sunset %}
                {% if sunrise < sunset %}
                  {% set next_event = sunrise %}
                  {% set last_event = sunrise - timedelta(days=1) %}
                {% else %}
                  {% set next_event = sunset %}
                  {% set last_event = sunset - timedelta(days=1) %}
                {% endif %}
                {% set delta = next_event - now_time %}
                {% set total_seconds = delta.total_seconds() %}
                {% if total_seconds > 1 %}
                  {% set days = (total_seconds // 86400) | int %}
                  {% set hours = (total_seconds % 86400) // 3600 %}
                  {% set minutes = (total_seconds % 3600) // 60 %}
                  {% set seconds = (total_seconds % 60) %}
                  Dans
                  {% if days > 0 %}
                    {{ days }}d
                  {% endif %}
                  {{ '%02dh%02dm%02ds' | format(hours | int, minutes | int, seconds | int) }}
                {% else %}
                  now
                {% endif %}
              {% else %}
                --h--m--s
              {% endif %}
            percent: >
              {% set sunrise = as_datetime(states('sensor.sun_next_rising')) %} {% set
              sunset = as_datetime(states('sensor.sun_next_setting')) %} {% set now_time
              = now() %} {% if sunrise and sunset %}
                {% if sunrise < sunset %}
                  {% set next_event = sunrise %}
                  {% set last_event = sunrise - timedelta(days=1) %}
                {% else %}
                  {% set next_event = sunset %}
                  {% set last_event = sunset - timedelta(days=1) %}
                {% endif %}
                {% set total = (next_event - last_event).total_seconds() %}
                {% set elapsed = (now_time - last_event).total_seconds() %}
                {% if total > 0 %}
                  {{ ((elapsed / total) * 100) | round(2) }}
                {% else %}
                  0
                {% endif %}
              {% else %}
                0
              {% endif %}
            tap_action:
              action: more-info
            fast_refresh: true
            grid_options:
              columns: 12
              rows: 2
          - type: heading
            heading: Maintenance days (hold/double tap)
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:entity-progress-card-dev
              entity: sensor.epb_demo_maintenance_days
              bar_orientation: rtl
              theme: critical_when_low
              double_tap_action:
                action: call-service
                service: script.epb_demo_reset_maintenance
              hold_action:
                action: call-service
                service: script.epb_demo_set_maintenance_near_due
              ```
              Real-world maintenance countdown - double-tap resets the
              counter (calls a script that stamps "now" as the last
              maintenance date), hold jumps it near-due to test the
              `alert_when` threshold without waiting.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: sensor.epb_demo_maintenance_days
            name: 'Real-world: maintenance countdown (double-tap to reset)'
            bar_orientation: rtl
            unit: days
            max_value: 35
            theme: critical_when_low
            layout: horizontal
            decimal: 0
            alert_when:
              below: 3
            bar_color_mode: rainbow
            double_tap_action:
              action: call-service
              service: script.epb_demo_reset_maintenance
            hold_action:
              action: call-service
              service: script.epb_demo_set_maintenance_near_due
            icon: mdi:fish
            grid_options:
              columns: 12
              rows: 1
      - type: grid
        cards:
          - type: heading
            heading: Crazy Card
            heading_style: title
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_printer_ink_yellow
            name: MATRIX_LOAD.exe
            icon: mdi:code-tags
            layout: vertical
            bar_position: overlay
            bar_orientation: up
            bar_effect:
              - shimmer_reverse
            theme: optimal_when_high
            state_content:
              - state
              - last_changed
            icon_animation:
              effect: pulse
              jinja: "{{ states('input_number.epb_demo_battery') | float > 60 }}"
            grid_options:
              columns: 4
              rows: 4
            card_mod:
              style: |
                ha-card {
                  background: #000;
                  --epb-card-border-width: 1px;
                  --epb-card-border-color: #00ff41;
                  --epb-progress-bar-color: #00ff41;
                  --epb-icon-and-shape-color: #00ff41;
                  --epb-name-color: #00ff41;
                  --epb-detail-color: #00ff41aa;
                  --epb-card-font-family: "Courier New", monospace;
                  --epb-name-font-weight: 700;
                  box-shadow: 0 0 20px #00ff4155;
                }
          - type: custom:entity-progress-badge-template-dev
            entity: input_number.epb_demo_power
            name: GRID/USD
            percent: '{{ ((states(entity) | float + 3000) / 60) }}'
            secondary: >-
              {{ '▲' if states(entity) | float > 0 else '▼' }} {{ states(entity)
              | float | abs }} W
            color: "{{ 'lime' if states(entity) | float > 0 else 'crimson' }}"
            card_mod:
              style: |
                ha-card {
                  background: #0a0a0a;
                  --epb-name-font-family: "Courier New", monospace;
                  --epb-name-font-weight: 900;
                }
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_battery
            name: VU METER
            icon: mdi:gauge
            bar_size: xlarge
            bar_segments: 12
            custom_theme:
              - min: 0
                max: 60
                color: '#39ff14'
              - min: 60
                max: 85
                color: '#ffd400'
              - min: 85
                max: 100
                color: '#ff2200'
            bar_color_mode: segment
            bar_effect:
              - radius
            card_mod:
              style: |
                ha-card {
                  background: #2b1d0e;
                  --epb-card-border-width: 4px;
                  --epb-card-border-color: #b8860b;
                  --epb-card-border-radius: 12px;
                  --epb-progress-bar-background-color: #1a1108;
                  --epb-name-color: #e8d9b5;
                  --epb-card-font-family: Georgia, serif;
                }
            grid_options:
              columns: 6
              rows: 2
          - type: tile
            entity: input_number.epb_demo_power
            name: ◈ GRID PULSE
            icon: mdi:hexagon-multiple-outline
            grid_options:
              columns: 12
              rows: 2
            card_mod:
              style: |
                ha-card {
                  background: linear-gradient(135deg, #0a0e27 0%, #1a1040 100%);
                  --epb-card-border-width: 1px;
                  --epb-card-border-color: #7b2ff7;
                  box-shadow: 0 0 30px #7b2ff755;
                }
            features:
              - type: custom:entity-progress-multi-feature-dev
                hide:
                  - icon
                  - name
                  - value
                bar_size: medium
                bar_effect: shimmer
                entities:
                  - entity: input_number.epb_demo_grid_consumption
                    bar_color: '#ff2d78'
                    max_value: 3000
                  - entity: input_number.epb_demo_solar_production
                    bar_color: '#00ffc8'
                    max_value: 3000
              - type: custom:entity-progress-feature-dev
                bar_size: medium
                bar_effect: shimmer
                entity: input_number.epb_demo_solar_production
                center_zero: true
                min_value: -3000
                max_value: 3000
                bar_color: '#7b2ff7'
                bar_stack:
                  entities:
                    - entity: input_number.epb_demo_grid_consumption
                      subtract: true
                      color: '#ff2d78'
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_power
            name: 🌊 ABYSS PRESSURE
            center_zero: true
            min_value: -3000
            max_value: 3000
            bar_effect:
              - glass
            bar_color_mode: rainbow
            theme: optimal_when_low
            watermark:
              type: area
              opacity: 0.5
              low:
                value: -1000
                color: '#001a33'
              high:
                value: 1000
                color: '#00b4d8'
            force_circular_background: true
            card_mod:
              style: |
                ha-card {
                  background: radial-gradient(circle at 30% 30%, #003554, #000814);
                  --epb-card-border-width: 1px;
                  --epb-card-border-color: #00b4d8;
                  --epb-icon-and-shape-color: #90e0ef;
                  --epb-name-color: #caf0f8;
                }
            grid_options:
              columns: 6
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: 🌋 MAGMA CHAMBER
            unit: °C
            theme: critical_when_extreme
            bar_effect:
              - gradient_reverse
              - shimmer
            bar_size: xlarge
            icon_animation:
              effect: shake
              jinja: "{{ states('input_number.epb_demo_temperature') | float > 30 }}"
            card_mod:
              style: |
                ha-card {
                  background: linear-gradient(0deg, #1a0000 0%, #3d0000 100%);
                  --epb-card-border-width: 2px;
                  --epb-card-border-color: #ff4500;
                  --epb-progress-bar-color: #ff6600;
                  --epb-icon-and-shape-color: #ffae00;
                  --epb-name-color: #ff8c00;
                  box-shadow: 0 0 25px #ff450066;
                }
            grid_options:
              columns: 6
              rows: 1
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_power
            name: ⚡ REACTOR CORE
            icon: mdi:atom
            center_zero:
              growth_percent: true
            min_value: -3000
            max_value: 3000
            bar_size: xlarge
            bar_color_mode: rainbow
            bar_effect:
              - glass
              - shimmer
            force_circular_background: true
            theme: optimal_when_high
            watermark:
              type: round
              opacity: 0.6
              low:
                value: -2000
                color: '#ff2d55'
              high:
                value: 2000
                color: '#00ffc8'
            icon_animation:
              effect: pulse
              jinja: "{{ states('input_number.epb_demo_power') | float | abs > 1500 }}"
            trend_indicator: true
            multiline: true
            custom_info: >-
              {{ 'CHARGING ⚡' if states(entity) | float > 0 else 'DISCHARGE 🔻'
              }}
            card_mod:
              style: |
                ha-card {
                  --epb-card-border-width: 2px;
                  --epb-card-border-color: #00ffc8;
                  --epb-card-border-radius: 20px;
                  --epb-progress-bar-radius: 20px;
                  --epb-icon-and-shape-color: #00ffc8;
                  --epb-name-color: #00ffc8;
                  --epb-name-font-weight: 900;
                  --epb-name-letter-spacing: 3px;
                  --epb-detail-color: #ffffffaa;
                  --epb-card-font-family: 'Courier New', monospace;
                  box-shadow: 0 0 25px 2px #00ffc855, inset 0 0 15px #00ffc822;
                }
            grid_options:
              columns: 6
              rows: 2
          - type: custom:entity-progress-card-template-dev
            entity: input_number.epb_demo_battery
            name: 🎰 JACKPOT METER
            percent: '{{ states(entity) }}'
            secondary: '{{ (states(entity) | float * 7.77) | round(0) }} pts'
            icon: mdi:slot-machine
            badge_icon: "{{ '✨' if states(entity) | float > 77 else '' }}"
            badge_color: gold
            bar_color_mode: rainbow
            bar_effect:
              - shimmer
            icon_animation:
              effect: bounce
              jinja: "{{ states('input_number.epb_demo_battery') | float > 77 }}"
            theme: optimal_when_high
            card_mod:
              style: |
                ha-card {
                  background: linear-gradient(135deg, #1a0033, #330018);
                  --epb-card-border-width: 3px;
                  --epb-card-border-color: #ffd700;
                  --epb-card-border-radius: 30px;
                  --epb-name-color: #ffd700;
                  --epb-name-font-weight: 900;
                  box-shadow: 0 0 30px #ffd70066, inset 0 0 20px #ffd70022;
                }
            grid_options:
              columns: 6
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_voc_bad
            name: ⛈ STORM INTENSITY
            bar_scale: log
            max_value: 50000
            theme: voc
            bar_size: xlarge
            watermark:
              type: striped
              opacity: 0.5
              low:
                value: 3000
                color: '#ffb300'
              high:
                value: 25000
                color: '#ff0033'
            alert_when:
              above: 25000
              color: '#ff0033'
              highlight: background
              animation: ping
            card_mod:
              style: |
                ha-card {
                  background: linear-gradient(180deg, #1c1c2e, #0d0d17);
                  --epb-card-border-width: 2px;
                  --epb-card-border-color: #6c757d;
                  --epb-name-color: #e0e0e0;
                }
            grid_options:
              columns: 6
              rows: 1
          - type: tile
            entity: input_boolean.epb_demo_charging
            name: ♥ VITALS MONITOR
            icon: mdi:heart-pulse
            card_mod:
              style: |
                ha-card {
                  background: #000;
                  --epb-card-border-width: 1px;
                  --epb-card-border-color: #39ff14;
                }
            features:
              - type: custom:entity-progress-multi-feature-dev
                hide:
                  - icon
                  - name
                  - value
                bar_size: xsmall
                bar_effect: shimmer
                entities:
                  - entity: input_number.epb_demo_battery
                    bar_color: '#39ff14'
                  - entity: input_number.epb_demo_temperature
                    bar_color: '#ff2d78'
                    min_value: 30
                    max_value: 42
                  - entity: input_number.epb_demo_power
                    bar_color: '#00e5ff'
                    min_value: -3000
                    max_value: 3000
            grid_options:
              columns: 6
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_power
            name: ✦ DEEP SPACE DRIFT
            center_zero:
              growth_percent: true
            min_value: -3000
            max_value: 3000
            bar_effect:
              - shimmer
            force_circular_background: true
            multiline: true
            custom_info: '{{ (states(entity) | float / 3000 * 100) | round(1) }}% velocity'
            icon: mdi:orbit-variant
            card_mod:
              style: |
                ha-card {
                  background:
                    radial-gradient(1px 1px at 20px 30px, white, transparent),
                    radial-gradient(1px 1px at 60px 80px, white, transparent),
                    radial-gradient(2px 2px at 100px 40px, white, transparent),
                    radial-gradient(1px 1px at 140px 90px, white, transparent),
                    linear-gradient(135deg, #0b0033, #1a0040);
                  --epb-card-border-width: 1px;
                  --epb-card-border-color: #b366ff;
                  --epb-icon-and-shape-color: #b366ff;
                  --epb-name-color: #e0c3ff;
                }
            grid_options:
              columns: 6
              rows: 2
          - type: custom:entity-progress-card-dev
            entity: input_number.epb_demo_temperature
            name: ☢️ CORE TEMP
            unit: °C
            bar_position: overlay
            bar_single_line: true
            text_effect: shadow
            custom_theme:
              - min: -20
                max: 25
                color: '#00ff41'
                icon: mdi:check-circle
              - min: 25
                max: 32
                color: '#ffb300'
                icon: mdi:alert
              - min: 32
                max: 40
                color: '#ff0033'
                icon: mdi:alert-octagon
            bar_color_mode: segment
            alert_when:
              above: 32
              color: '#ff0033'
              highlight: background
              animation: ping
            badge_icon: "{{ 'mdi:radioactive' if states(entity) | float > 32 else '' }}"
            badge_color: '#ff0033'
            name_info: >-
              {% if states(entity) | float > 32 %}<span
              style="color:#ff0033;font-weight:900;">⚠ CRITICAL</span>{% endif
              %}
            card_mod:
              style: |
                ha-card {
                  --epb-card-border-width: 3px;
                  --epb-card-border-color: #ff0033;
                  --epb-card-border-style: dashed;
                  --epb-card-border-radius: 8px;
                  --epb-card-font-family: 'Courier New', monospace;
                  --epb-name-letter-spacing: 4px;
                  animation: defcon-shake 4s ease-in-out infinite;
                }
                @keyframes defcon-shake {
                  0%, 96%, 100% { transform: translateX(0); }
                  97% { transform: translateX(-2px); }
                  98% { transform: translateX(2px); }
                  99% { transform: translateX(-1px); }
                }
            grid_options:
              columns: 6
              rows: 2
        column_span: 2
      - type: grid
        cards:
          - type: heading
            heading: Mushroom Template card hosting the feature
            heading_style: title
          - type: markdown
            content: |
              {% raw %}
              ```yaml
              type: custom:mushroom-template-card
              entity: sensor.epb_demo_battery_ev
              primary: EV battery
              icon: mdi:car-electric
              features_position: bottom
              features:
                - type: custom:entity-progress-feature-dev
                  theme: optimal_when_high
                  bar_color_mode: rainbow
              ```
              A Mushroom Template card (v5) is a feature host like the
              tile: the feature takes the card's entity when it sets none.
              {% endraw %}
            grid_options:
              columns: 12
              rows: 2
          - type: custom:mushroom-template-card
            entity: sensor.epb_demo_battery_ev
            primary: EV battery
            secondary: "{{ states(entity) }} %"
            icon: mdi:car-electric
            features_position: bottom
            features:
              - type: custom:entity-progress-feature-dev
                theme: optimal_when_high
                bar_color_mode: rainbow
            grid_options:
              columns: 6
          - type: custom:mushroom-template-card
            entity: sensor.epb_demo_battery_ev
            primary: EV battery
            icon: mdi:car-electric
            features_position: inline
            features:
              - type: custom:entity-progress-feature-dev
                theme: optimal_when_high
            grid_options:
              columns: 6
