3D printer Mushroom style card

I just used this topic to create a card for my octoprint setup. So easy to use when you have octoprint (my printer is a ender 3 pro, but rename of course for your liking).

type: custom:stack-in-card
mode: vertical
cards:
  - type: horizontal-stack
    cards:
      - type: conditional
        conditions:
          - condition: state
            entity: binary_sensor.octoprint_printing
            state: 'on'
        card:
          type: tile
          entity: sensor.octoprint_current_state
          icon: mdi:printer-3d-nozzle
          color: green
          name: Ender 3 Pro
      - type: conditional
        conditions:
          - condition: state
            entity: binary_sensor.octoprint_printing
            state: 'off'
        card:
          type: tile
          name: Ender 3 Pro
          entity: sensor.octoprint_current_state
          icon: mdi:printer-3d-nozzle
          color: blue
          show_entity_picture: false
      - type: conditional
        conditions:
          - condition: state
            entity: switch.3d_printer
            state: 'on'
        card:
          show_state: false
          show_name: false
          camera_view: live
          type: picture-entity
          entity: camera.ender3pro_local
          camera_image: camera.ender3pro_local
  - type: custom:mushroom-chips-card
    chips:
      - type: template
        content: '{{ states(''sensor.octoprint_actual_tool0_temp'') }} °C'
        icon: mdi:printer-3d-nozzle-heat
      - type: template
        content: '{{ states(''sensor.octoprint_actual_bed_temp'') }} °C'
        icon: mdi:heating-coil
      - type: conditional
        conditions:
          - condition: state
            entity: sensor.octoprint_current_state
            state: Printing
        chip:
          type: template
          content: >-
            {{ states('sensor.octoprint_estimated_finish_time') | as_timestamp |
            timestamp_custom ('%H:%M') }}
          icon: mdi:timer-sand-complete
      - type: conditional
        conditions:
          - condition: state
            entity: sensor.octoprint_current_state
            state: Printing
        chip:
          type: template
          content: >-
            {% set time =
            ((as_timestamp(states('sensor.octoprint_estimated_finish_time')) -
            as_timestamp(now())) | int) | int %} {% set minutes = ((time % 3600)
            / 60) | int %} {% set hours = ((time % 86400) / 3600) | int %} {%
            set days = (time / 86400) | int %}

            {%- if time < 60 -%}
              Less than a minute
              {%- else -%}
              {%- if days > 0 -%}
                {{ days }}d
              {%- endif -%}
              {%- if hours > 0 -%}
                {%- if days > 0 -%}
                  {{ ' ' }}
                {%- endif -%}
                {{ hours }}h
              {%- endif -%}
              {%- if minutes > 0 -%}
                {%- if days > 0 or hours > 0 -%}
                  {{ ' ' }}
                {%- endif -%}
                {{ minutes }}m
              {%- endif -%}
            {%- endif -%}
          icon: mdi:timer

This is my screenprint:
image

only thing what’s not worked out yet for me is the percentage, so I anyone can provide me the complete example I will be very happy

1 Like

@CommittotheIndian, below is my full code for the OctoPrint version, sorry I can’t help with the Prusalink equivalent. In theory, you should be able to find and replace the following entities with your Prusalink and HA entity equivalents. The only oddities being the temperature conversion I do inside the card chips and maybe the print/estimated times. Mushroom cards, stack-in-card, card-mod and swipe-card required. If you post your code I can help troubleshoot.

Printer entities:
binary_sensor.octoprint_printing
sensor.octoprint_print_status
sensor.octoprint_print_progress
sensor.octoprint_print_file
sensor.octoprint_actual_tool0_temp
sensor.octoprint_actual_bed_temp
sensor.octoprint_print_time
sensor.octoprint_estimated_finish_time
button.octoprint_pause_job
button.octoprint_resume_job
button.octoprint_emergency_stop

HA entities (helpers and cameras):
input_boolean.3d_printer_camera_view
input_boolean.3d_printer_stl_preview
camera.octoprint_camera
camera.slicer_preview

type: custom:stack-in-card
cards:
  - type: custom:mushroom-template-card
    entity: input_boolean.3d_printer_camera_view
    primary: Prusa MK3S+
    tap_action:
      action: toggle
    hold_action:
      action: navigate
      navigation_path: /lovelace/3d-printer
    secondary: |-
      {% if is_state('sensor.octoprint_print_status','Printing') or
      is_state('sensor.octoprint_print_status','Resuming') or
      is_state('sensor.octoprint_print_status','Pausing') or
      is_state('sensor.octoprint_print_status','Paused') %}
        {{ (states('sensor.octoprint_print_progress') | round(0) )}}% {{states('sensor.octoprint_print_status')}}
        {% set list = states('sensor.octoprint_print_file').split('_') %}
        {{list[list | length-3]}}
      {% else %}
        {{states('sensor.octoprint_print_status')}}
      {% endif %}       
    icon: >-
      {% if is_state('sensor.octoprint_print_status','Operational') %}
        mdi:printer-3d
      {% elif is_state('sensor.octoprint_print_status','Printing') or
      is_state('sensor.octoprint_print_status','Resuming') or
      is_state('sensor.octoprint_print_status','Pausing') or
      is_state('sensor.octoprint_print_status','Paused') %}
        mdi:printer-3d-nozzle
      {% elif is_state('sensor.octoprint_print_status','Cancelling') or
      is_state('sensor.octoprint_print_status','Error') or
      is_state('sensor.octoprint_print_status','Offline after error') %}
        mdi:close-octagon
      {% elif is_state('sensor.octoprint_print_status','unavailable') or
      is_state('sensor.octoprint_print_status','Unknown') %}
        mdi:printer-3d-off
      {% endif %}
    icon_color: >-
      {% if is_state('sensor.octoprint_print_status','Paused') or
      is_state('sensor.octoprint_print_status','Pausing') %}
        #fc6d09
      {% elif is_state('sensor.octoprint_print_status','Cancelling') or
      is_state('sensor.octoprint_print_status','Error') or
      is_state('sensor.octoprint_print_status','Offline after error') %}
        red
      {% else %}
        var(--primary-text-color)
      {% endif %}
    badge_icon: >-
      {% if is_state('sensor.octoprint_print_status','Paused') or
      is_state('sensor.octoprint_print_status','Pausing') %}
        mdi:pause
      {% elif is_state('sensor.octoprint_print_status','Resuming') %}
        mdi:play
      {% endif %}
    badge_color: >-
      {% if is_state('sensor.octoprint_print_status','Paused') or
      is_state('sensor.octoprint_print_status','Pausing') %}
        grey
      {% elif is_state('sensor.octoprint_print_status','Resuming') %}
        green
      {% endif %}
    card_mod:
      style:
        mushroom-shape-icon$: |
          .shape {
            {% if is_state('sensor.octoprint_print_status','Printing') or
            is_state('sensor.octoprint_print_status','Resuming') %}
              background: radial-gradient(var(--card-background-color) 60%, transparent 0%), conic-gradient(rgb(252,109,9) {{ states('sensor.octoprint_print_progress') | round(0) }}% 0%, var(--card-background-color) 0% 100%);
            {% elif is_state('sensor.octoprint_print_status','Operational') %}
              background: radial-gradient(var(--card-background-color) 60%, transparent 0%), conic-gradient(rgb(53,190,37) 100% 0%, var(--card-background-color) 0% 100%);              
            {% elif is_state('sensor.octoprint_print_status','Cancelling') or
            is_state('sensor.octoprint_print_status','Error') or
            is_state('sensor.octoprint_print_status','Offline after error')%}
              background: radial-gradient(var(--card-background-color) 60%, transparent 0%), conic-gradient(red 100% 0%, var(--card-background-color) 0% 100%);              
            {% else %}
              background: radial-gradient(var(--card-background-color) 60%, transparent 0%), conic-gradient(#9e9e9e {{ states('sensor.octoprint_print_progress') | round(0) }}% 0%, var(--card-background-color) 0% 100%);
            {% endif %} 
          }
          .shape:after {
            content: "";
            height: 100%;
            width: 100%;
            position: absolute;
            border-radius: 50%;
          }
        .: |
          ha-state-icon {
            {% if is_state('sensor.octoprint_print_status','Printing') or
            is_state('sensor.octoprint_print_status','Resuming')%}
              clip-path: inset(83% 72% 0 0);
            {% endif %}
          }
          ha-card {
            border: none;
          }
          mushroom-badge-icon {
            {% if is_state('sensor.octoprint_print_status','Pausing') or
            is_state('sensor.octoprint_print_status','Paused')%}
              animation: pulse 2s infinite;
            {% endif %}
          }
  - type: custom:mushroom-chips-card
    chips:
      - type: template
        content: >-
          {{ (((states('sensor.octoprint_actual_tool0_temp') | float - 32) * 5 /
          9) | round(1) )}} °C
        icon: mdi:printer-3d-nozzle-heat
        entity: sensor.octoprint_actual_tool0_temp
        tap_action:
          action: more-info
        hold_action:
          action: navigate
          navigation_path: /lovelace/3d-printer
        card_mod:
          style: |
            ha-card {
              border: none;
            }
      - type: template
        content: >-
          {{ (((states('sensor.octoprint_actual_bed_temp') | float - 32) * 5 /
          9) | round(1) )}} °C
        icon: mdi:heating-coil
        entity: sensor.octoprint_actual_bed_temp
        tap_action:
          action: more-info
        hold_action:
          action: navigate
          navigation_path: /lovelace/3d-printer
        card_mod:
          style: |
            ha-card {
              border: none;
            }
      - type: conditional
        conditions:
          - condition: state
            entity: binary_sensor.octoprint_printing
            state: 'on'
        chip:
          type: template
          content: >-
            {% set time = (states('sensor.octoprint_print_time') | int) | int %}
            {% set minutes = ((time % 3600) / 60) | int %} {% set hours = ((time
            % 86400) / 3600) | int %} {% set days = (time / 86400) | int %}

            {%- if time < 60 -%}
              Less than a minute
              {%- else -%}
              {%- if days > 0 -%}
                {{ days }}d
              {%- endif -%}
              {%- if hours > 0 -%}
                {%- if days > 0 -%}
                  {{ ' ' }}
                {%- endif -%}
                {{ hours }}h
              {%- endif -%}
              {%- if minutes > 0 -%}
                {%- if days > 0 or hours > 0 -%}
                  {{ ' ' }}
                {%- endif -%}
                {{ minutes }}m
              {%- endif -%}
            {%- endif -%}
          icon: mdi:timer-outline
          entity: sensor.octoprint_print_time
          tap_action:
            action: more-info
          hold_action:
            action: navigate
            navigation_path: /lovelace/3d-printer
          card_mod:
            style: |
              ha-card {
              border: none;
              }
      - type: conditional
        conditions:
          - condition: state
            entity: binary_sensor.octoprint_printing
            state: 'on'
        chip:
          type: template
          content: >
            {% if utcnow().day ==
            as_datetime(states('sensor.octoprint_estimated_finish_time')).day %}
              Today {{as_timestamp(states('sensor.octoprint_estimated_finish_time')) | timestamp_custom ('%H:%M') }}
            {% elif now().day ==
            as_datetime(states('sensor.octoprint_estimated_finish_time')).day -
            1 %}
              Tmrw {{as_timestamp(states('sensor.octoprint_estimated_finish_time')) | timestamp_custom ('%H:%M') }}
            {% elif utcnow().day >
            as_datetime(states('sensor.octoprint_estimated_finish_time')).day %}
              Null
            {% else %} 
              {{as_timestamp(states('sensor.octoprint_estimated_finish_time')) | timestamp_custom ('%b %d %H:%M') }} 
            {% endif %}
          icon: mdi:clock-check-outline
          entity: sensor.octoprint_estimated_finish_time
          tap_action:
            action: more-info
          hold_action:
            action: navigate
            navigation_path: /lovelace/3d-printer
          card_mod:
            style: |
              ha-card {
                border: none;
              }
  - type: custom:mushroom-chips-card
    chips:
      - type: conditional
        conditions:
          - condition: or
            conditions:
              - condition: state
                entity: sensor.octoprint_print_status
                state: Printing
              - condition: state
                entity: sensor.octoprint_print_status
                state: Resuming
        chip:
          type: entity
          entity: button.octoprint_pause_job
          icon_color: white
          icon: mdi:pause
          content_info: none
          tap_action:
            action: toggle
          card_mod:
            style: |
              ha-card {
                --chip-background: rgba(var(--rgb-grey), 0.7);
                --icon-color: rgb(var(--rgb-white));
              } 
      - type: conditional
        conditions:
          - condition: or
            conditions:
              - condition: state
                entity: sensor.octoprint_print_status
                state: Paused
              - condition: state
                entity: sensor.octoprint_print_status
                state: Pausing
        chip:
          type: entity
          entity: button.octoprint_resume_job
          icon_color: white
          icon: mdi:play
          content_info: none
          tap_action:
            action: toggle
          card_mod:
            style: |
              ha-card {
                --chip-background: rgba(var(--rgb-green), 0.7);
                --icon-color: rgb(var(--rgb-white));
              } 
      - type: conditional
        conditions:
          - condition: or
            conditions:
              - condition: state
                entity: sensor.octoprint_print_status
                state: Printing
              - condition: state
                entity: sensor.octoprint_print_status
                state: Pausing
              - condition: state
                entity: sensor.octoprint_print_status
                state: Paused
              - condition: state
                entity: sensor.octoprint_print_status
                state: Resuming
        chip:
          type: entity
          entity: button.octoprint_emergency_stop
          icon_color: white
          icon: mdi:alert-octagon
          content_info: none
          tap_action:
            action: toggle
          card_mod:
            style: |
              ha-card {
                --chip-background: rgba(var(--rgb-red), 1);
              } 
    card_mod:
      style: |
        ha-card {
            --chip-box-shadow: none;
            top: 16px;
            width: -webkit-fill-available;
            right: 12px;
            position: absolute;
        } 
        .chip-container {
            right: 0px;
            position: absolute;
        }
  - type: conditional
    conditions:
      - condition: or
        conditions:
          - condition: state
            entity: sensor.octoprint_print_status
            state: Printing
          - condition: state
            entity: sensor.octoprint_print_status
            state: Resuming
    card:
      type: custom:mushroom-template-card
      icon: mdi:printer-3d-nozzle
      icon_color: var(--primary-text-color)
      entity: input_boolean.3d_printer_camera_view
      tap_action:
        action: toggle
      double_tap_action:
        action: call-service
        service: input_boolean.toggle
        target:
          entity_id: input_boolean.3d_printer_stl_preview
      hold_action:
        action: navigate
        navigation_path: /lovelace/3d-printer
      card_mod:
        style:
          mushroom-shape-icon$: |
            .shape {
              --shape-color: none;
            }
          .: |
            ha-card {
              position: absolute;
              top: 0px;
              border: none;
            }
            ha-state-icon {
              animation: print 1s linear infinite alternate;
            }
            @keyframes print {
              0% { transform: translateX(4px); }
              30% { clip-path: polygon(0 0, 100% 0%, 100% 100%, 0 100%, 0 26%); }
              100% { transform: translateX(-4px); clip-path: polygon(0 0, 100% 0%, 100% 100%, 40% 100%, 0 26%); }
            }
  - type: conditional
    conditions:
      - condition: state
        entity: input_boolean.3d_printer_camera_view
        state: 'on'
    card:
      type: custom:swipe-card
      reset_after: 5
      start_card: 1
      parameters:
        slidesPerView: 2
        preloadImages: true
        effect: flip
        pagination:
          type: bullets
      cards:
        - type: picture-entity
          entity: camera.octoprint_camera
          show_name: false
          show_state: false
          camera_view: live
          aspect_ratio: '4:3'
        - type: picture-entity
          entity: camera.slicer_preview
          show_state: false
          show_name: false
          aspect_ratio: '4:3'
card_mod:
  style: |
    ha-card {
      
    }

@mariobrosch, the percentage ring is accomplished using card-mod. You should be able to add the card-mod attribute to your title card, like so:

type: custom:stack-in-card
mode: vertical
cards:
  - type: horizontal-stack
    cards:
      - type: conditional
        conditions:
          - condition: state
            entity: binary_sensor.octoprint_printing
            state: 'on'
        card:
          type: tile
          entity: sensor.octoprint_current_state
          icon: mdi:printer-3d-nozzle
          color: green
          name: Ender 3 Pro
          card_mod:
            style:
              ha-tile-icon$: |
                .shape {
                    background: radial-gradient(var(--card-background-color) 60%, transparent 0%), conic-gradient(green {{ states('sensor.octoprint_print_progress') | round(0) }}% 0%, var(--card-background-color) 0% 100%);
                }
                .shape:after {
                  content: "";
                  height: 100%;
                  width: 100%;
                  position: absolute;
                  border-radius: 50%;
                  background: rgba(var(--rgb-{{ config.icon_color }}), 0.1);
                }
                ha-card {
                  border: none;
                }
      - type: conditional
        conditions:
          - condition: state
            entity: binary_sensor.octoprint_printing
            state: 'off'
        card:
          type: tile
          name: Ender 3 Pro
          entity: sensor.octoprint_current_state
          icon: mdi:printer-3d-nozzle
          color: blue
          show_entity_picture: false
      - type: conditional
        conditions:
          - condition: state
            entity: switch.3d_printer
            state: 'on'
        card:
          show_state: false
          show_name: false
          camera_view: live
          type: picture-entity
          entity: camera.ender3pro_local
          camera_image: camera.ender3pro_local
  - type: custom:mushroom-chips-card
    chips:
      - type: template
        content: '{{ states(''sensor.octoprint_actual_tool0_temp'') }} °C'
        icon: mdi:printer-3d-nozzle-heat
      - type: template
        content: '{{ states(''sensor.octoprint_actual_bed_temp'') }} °C'
        icon: mdi:heating-coil
      - type: conditional
        conditions:
          - condition: state
            entity: sensor.octoprint_current_state
            state: Printing
        chip:
          type: template
          content: >-
            {{ states('sensor.octoprint_estimated_finish_time') | as_timestamp |
            timestamp_custom ('%H:%M') }}
          icon: mdi:timer-sand-complete
      - type: conditional
        conditions:
          - condition: state
            entity: sensor.octoprint_current_state
            state: Printing
        chip:
          type: template
          content: >-
            {% set time =
            ((as_timestamp(states('sensor.octoprint_estimated_finish_time')) -
            as_timestamp(now())) | int) | int %} {% set minutes = ((time % 3600)
            / 60) | int %} {% set hours = ((time % 86400) / 3600) | int %} {%
            set days = (time / 86400) | int %}

            {%- if time < 60 -%}
              Less than a minute
              {%- else -%}
              {%- if days > 0 -%}
                {{ days }}d
              {%- endif -%}
              {%- if hours > 0 -%}
                {%- if days > 0 -%}
                  {{ ' ' }}
                {%- endif -%}
                {{ hours }}h
              {%- endif -%}
              {%- if minutes > 0 -%}
                {%- if days > 0 or hours > 0 -%}
                  {{ ' ' }}
                {%- endif -%}
                {{ minutes }}m
              {%- endif -%}
            {%- endif -%}
          icon: mdi:timer
1 Like

Sure, sorry, I haven’t been on over the holidays.

type: custom:stack-in-card
cards:
  - type: custom:mushroom-template-card
    entity: sensor.prusalink
    primary: Prusa MK4
    secondary: |-
      {% if is_state('sensor.prusalink','printing') or
      is_state('sensor.prusalink','resuming') or
      is_state('sensor.prusalink','pausing') or
      is_state('sensor.prusalink','paused') %}
        {{ (states('sensor.prusalink_progress') | round(0) )}}% {{states('sensor.prusalink') | title }} {{states('sensor.prusalink_material') }}
      {% else %}
        {{states('sensor.prusalink') | title }}
      {% endif %}       
    icon: >-
      {% if is_state('sensor.prusalink','idle') %}
        mdi:printer-3d
      {% elif is_state('sensor.prusalink','printing') or
      is_state('sensor.prusalink','pausing') or
      is_state('sensor.prusalink','paused') %}
        mdi:printer-3d-nozzle
      {% elif is_state('sensor.prusalink','cancelling') or
      is_state('sensor.prusalink','Error') %}
        mdi:close-octagon
      {% elif is_state('sensor.prusalink','unavailable') or
      is_state('sensor.prusalink','unknown') %}
        mdi:printer-3d-off
      {% endif %}
    icon_color: >-
      {% if is_state('sensor.prusalink','paused') or
      is_state('sensor.prusalink','pausing') %}
        #fc6d09
      {% elif is_state('sensor.prusalink','cancelling') or
      is_state('sensor.prusalink','Error') %}
        red
      {% endif %}
    badge_icon: >-
      {% if is_state('sensor.prusalink','paused') or
      is_state('sensor.prusalink','pausing') %}
        mdi:pause
      {% elif is_state('sensor.prusalink','resuming') %}
        mdi:play
      {% endif %}
    badge_color: >-
      {% if is_state('sensor.prusalink','paused') or
      is_state('sensor.prusalink','pausing') %}
        grey
      {% elif is_state('sensor.prusalink','resuming') %}
        green
      {% endif %}
    card_mod:
      style:
        mushroom-shape-icon$: |
          .shape {
            {% if is_state('sensor.prusalink','printing') %}
              background: radial-gradient(var(--card-background-color) 60%, transparent 0%), conic-gradient(rgb(252,109,9) {{ states('sensor.prusalink_progress') | round(0) }}% 0%, var(--card-background-color) 0% 100%);
            {% elif is_state('sensor.prusalink','idle') %}
              background: radial-gradient(var(--card-background-color) 60%, transparent 0%), conic-gradient(rgb(53,190,37) 100% 0%, var(--card-background-color) 0% 100%);              
            {% elif is_state('sensor.prusalink','cancelling') or
            is_state('sensor.prusalink','error') %}
              background: radial-gradient(var(--card-background-color) 60%, transparent 0%), conic-gradient(red 100% 0%, var(--card-background-color) 0% 100%);              
            {% else %}
              background: radial-gradient(var(--card-background-color) 60%, transparent 0%), conic-gradient(#9e9e9e {{ states('sensor.prusalink_progress') | round(0) }}% 0%, var(--card-background-color) 0% 100%);
            {% endif %} 
          }
          .shape:after {
            content: "";
            height: 100%;
            width: 100%;
            position: absolute;
            border-radius: 50%;
            background: rgba(var(--rgb-{{ config.icon_color }}), 0.1);
          }
        .: |
          ha-state-icon {
            {% if is_state('sensor.prusalink_progress','Printing') or
            is_state('sensor.prusalink_progress','resuming')%}
              clip-path: inset(83% 72% 0 0);
            {% endif %}
          }
          ha-card {
            border: none;
          }
          mushroom-badge-icon {
            {% if is_state('sensor.prusalink_progress','Pausing') or
            is_state('sensor.prusalink_progress','Paused')%}
              animation: pulse 2s infinite;
            {% endif %}
          }
  - type: custom:mushroom-chips-card
    chips:
      - type: template
        content: '{{ states(''sensor.prusalink_nozzle_temperature'') }} °C'
        icon: mdi:printer-3d-nozzle-heat
        card_mod:
          style: |
            ha-card {
              --chip-background: rgba(var(--rgb-{{ config.icon_color }}), 0.1);
              border: none;
            }
      - type: template
        content: '{{ states(''sensor.prusalink_heatbed_temperature'') }} °C'
        icon: mdi:heating-coil
        card_mod:
          style: |
            ha-card {
              --chip-background: rgba(var(--rgb-{{ config.icon_color }}), 0.1);
              border: none;
            }
      - type: conditional
        conditions:
          - condition: state
            entity: sensor.prusalink
            state: printing
        chip:
          type: template
          content: >-
            {% set time =
            ((as_timestamp(states('sensor.prusalink_print_finish')) -
            as_timestamp(now())) | int) | int %} {% set minutes = ((time % 3600)
            / 60) | int %} {% set hours = ((time % 86400) / 3600) | int %} {%
            set days = (time / 86400) | int %}

            {%- if time < 60 -%}
              Less than a minute
              {%- else -%}
              {%- if days > 0 -%}
                {{ days }}d
              {%- endif -%}
              {%- if hours > 0 -%}
                {%- if days > 0 -%}
                  {{ ' ' }}
                {%- endif -%}
                {{ hours }}h
              {%- endif -%}
              {%- if minutes > 0 -%}
                {%- if days > 0 or hours > 0 -%}
                  {{ ' ' }}
                {%- endif -%}
                {{ minutes }}m
              {%- endif -%}
            {%- endif -%}
          icon: mdi:timer-outline
          card_mod:
            style: |
              ha-card {
                --chip-background: --chip-background: rgba(var(--rgb-{{ config.icon_color }}), 0.1);
              border: none;
              }
      - type: conditional
        conditions:
          - condition: state
            entity: sensor.prusalink
            state: printing
        chip:
          type: template
          content: >-
            {% if utcnow().day ==
            as_datetime(states('sensor.prusalink_print_finish')).day%} Today
              {{ as_timestamp(states('sensor.prusalink_print_finish')) | timestamp_custom ('%H:%M') }}
            {% elif utcnow().day ==
            as_datetime(states('sensor.prusalink_print_finish')).day - 1 %} Tmrw
              {{ as_timestamp(states('sensor.prusalink_print_finish')) | timestamp_custom ('%H:%M') }}
            {% elif utcnow().day >
            as_datetime(states('sensor.prusalink_print_finish')).day%} {% else
            %}
              {{ as_timestamp(states('sensor.prusalink_print_finish')) | timestamp_custom ('%b %d %H:%M') }}
            {% endif%}
          icon: mdi:clock-check-outline
          card_mod:
            style: |
              ha-card {
                --chip-background: --chip-background: rgba(var(--rgb-{{ config.icon_color }}), 0.1);
                border: none;
              }
  - type: custom:mushroom-chips-card
    chips:
      - type: conditional
        conditions:
          - condition: state
            entity: sensor.prusalink
            state: paused
        chip:
          type: entity
          entity: button.prusalink_resume_job
          icon_color: white
          icon: mdi:play
          content_info: none
          tap_action:
            action: toggle
          card_mod:
            style: |
              ha-card {
                --chip-background: rgba(var({{ '--rgb-grey' }}), 0.7);
                --icon-color: rgb(var(--rgb-white));
              }
      - type: conditional
        conditions:
          - condition: state
            entity: sensor.prusalink
            state: printing
        chip:
          type: entity
          entity: button.prusalink_resume_job
          icon_color: white
          icon: mdi:pause
          content_info: none
          tap_action:
            action: toggle
          card_mod:
            style: |
              ha-card {
                --chip-background: rgba(var({{ '--rgb-grey' }}), 0.7);
                --icon-color: rgb(var(--rgb-white));
              }
      - type: conditional
        conditions:
          - condition: state
            entity: button.prusalink_cancel_job
            state_not: unavailable
        chip:
          type: entity
          entity: button.prusalink_cancel_job
          icon_color: white
          icon: mdi:alert-octagon
          content_info: none
          tap_action:
            action: toggle
          card_mod:
            style: |
              ha-card {
                --chip-background: rgba(var({{ '--rgb-red' }}), 1);
              } 
    card_mod:
      style: |
        ha-card {
            --chip-box-shadow: none;
            top: 16px;
            width: -webkit-fill-available;
            right: 12px;
            position: absolute;
        } 
        .chip-container {
            right: 0px;
            position: absolute;
        }

2 Likes

hi is there a way to show the history of the last prints (from sensor.name_print) ?

Anyone have something set up for klipper with the moonraker integration? I tried updating the sensors from the octoprint one but it didn’t work.