hello why have conf error in this code?
type: custom:tabbed-card
options: {}
tabs:
- label: In Stampa / Caricati
card:
type: custom:auto-entities
filter:
include:
- integration: "*spoolman*"
attributes:
archived: false
state_filter:
- operator: template
value: |
{% set trays = states.sensor
| selectattr('entity_id', 'search', 'bambu_h2d_ams.*tray')
| selectattr('attributes.tag_uid','!=','')
| selectattr('attributes.tag_uid','!=',None)
| selectattr('attributes.tag_uid','!=','0000000000000000')
| list %}
{% set this_rfid = state_attr(entity, 'extra_rfid_tag_string2') %}
{% set active_trays = trays | selectattr('attributes.active', 'eq', true) | list %}
{% set active_match = active_trays | selectattr('attributes.tag_uid', 'eq', this_rfid) | list | length > 0 %}
{{ state_attr(entity, 'klipper_active_spool') == true or active_match }}
options:
type: custom:mushroom-template-card
vertical: false
icon_color: "#{{ state_attr(entity, 'filament_color_hex') }}"
icon: mdi:printer-3d-nozzle
card_mod:
style: >
{% set trays = states.sensor
| selectattr('entity_id', 'search', 'bambu_h2d_ams.*tray')
| selectattr('attributes.tag_uid','!=','')
| selectattr('attributes.tag_uid','!=',None)
| selectattr('attributes.tag_uid','!=','0000000000000000')
| list %}
{% set this_rfid = state_attr(entity, 'extra_rfid_tag_string2') %}
{% set active_trays = trays | selectattr('attributes.active', 'eq', true) | list %}
{% set match_count = trays | selectattr('attributes.tag_uid', 'eq', this_rfid) | list | length %}
{% set active_match = active_trays | selectattr('attributes.tag_uid', 'eq', this_rfid) | list | length > 0 %}
{% if active_match %}
:host {
background: linear-gradient(135deg, #d4edda, #c3e6cb) !important;
border: 2px solid #28a745 !important;
border-radius: 12px !important;
}
{% elif match_count > 0 %}
:host {
background: linear-gradient(135deg, #fff3cd, #ffeaa7) !important;
border: 2px solid #ffc107 !important;
border-radius: 12px !important;
}
{% endif %}
badge_icon: >
{% set trays = states.sensor
| selectattr('entity_id', 'search', 'bambu_h2d_ams.*tray')
| selectattr('attributes.tag_uid','!=','')
| selectattr('attributes.tag_uid','!=',None)
| selectattr('attributes.tag_uid','!=','0000000000000000')
| list %}
{% set this_rfid = state_attr(entity, 'extra_rfid_tag_string2') %}
{% set active_trays = trays | selectattr('attributes.active', 'eq', true) | list %}
{% set match_count = trays | selectattr('attributes.tag_uid', 'eq', this_rfid) | list | length %}
{% set active_match = active_trays | selectattr('attributes.tag_uid', 'eq', this_rfid) | list | length > 0 %}
{% if active_match %}
mdi:play-circle
{% elif match_count > 0 %}
mdi:printer-3d
{% elif state_attr(entity, 'archived') == true %}
mdi:archive
{% elif state_attr(entity, 'klipper_active_spool') == true %}
mdi:check-circle
{% endif %}
badge_color: >
{% set trays = states.sensor
| selectattr('entity_id', 'search', 'bambu_h2d_ams.*tray')
| selectattr('attributes.tag_uid','!=','')
| selectattr('attributes.tag_uid','!=',None)
| selectattr('attributes.tag_uid','!=','0000000000000000')
| list %}
{% set this_rfid = state_attr(entity, 'extra_rfid_tag_string2') %}
{% set active_trays = trays | selectattr('attributes.active', 'eq', true) | list %}
{% set match_count = trays | selectattr('attributes.tag_uid', 'eq', this_rfid) | list | length %}
{% set active_match = active_trays | selectattr('attributes.tag_uid', 'eq', this_rfid) | list | length > 0 %}
{% if active_match %}
green
{% elif match_count > 0 %}
yellow
{% elif state_attr(entity, 'archived') == true %}
orange
{% elif state_attr(entity, 'klipper_active_spool') == true %}
green
{% else %}
default_color
{% endif %}
primary: |
{% set vendor = state_attr(entity, 'filament_vendor_name') %}
{% set name = state_attr(entity, 'filament_name') %}
{% set material = state_attr(entity, 'filament_material') %}
{% set location = state_attr(entity, 'location') %}
{% if vendor or name or material or location %}
{{ vendor if vendor else '' }} {{ name if name else '' }} {{ material if material else '' }} {{ '(' ~ location ~ ')' if location else '' }}
{% else %}
Informazioni non disponibili
{% endif %}
secondary: "{{ (state_attr(entity, 'remaining_weight') | float) | round(2) }} g"
tap_action:
action: more-info
sort:
method: attribute
attribute: filament_color_hex
numeric: false
reverse: false
card:
square: false
type: grid
card_param: cards
grid_options:
columns: 48
rows: auto
- label: Tutti i Filamenti
card:
type: custom:auto-entities
filter:
include:
- integration: "*spoolman*"
attributes:
archived: false
options:
type: custom:mushroom-template-card
vertical: false
icon_color: "#{{ state_attr(entity, 'filament_color_hex') }}"
icon: mdi:printer-3d-nozzle
card_mod:
style: >
{% set trays = states.sensor
| selectattr('entity_id', 'search', 'bambu_h2d_ams.*tray')
| selectattr('attributes.tag_uid','!=','')
| selectattr('attributes.tag_uid','!=',None)
| selectattr('attributes.tag_uid','!=','0000000000000000')
| list %}
{% set this_rfid = state_attr(entity, 'extra_rfid_tag_string2') %}
{% set active_trays = trays | selectattr('attributes.active', 'eq', true) | list %}
{% set match_count = trays | selectattr('attributes.tag_uid', 'eq', this_rfid) | list | length %}
{% set active_match = active_trays | selectattr('attributes.tag_uid', 'eq', this_rfid) | list | length > 0 %}
{% if active_match %}
:host {
background: linear-gradient(135deg, #d4edda, #c3e6cb) !important;
border: 2px solid #28a745 !important;
border-radius: 12px !important;
}
{% elif match_count > 0 %}
:host {
background: linear-gradient(135deg, #fff3cd, #ffeaa7) !important;
border: 2px solid #ffc107 !important;
border-radius: 12px !important;
}
{% endif %}
badge_icon: >
{% set trays = states.sensor
| selectattr('entity_id', 'search', 'bambu_h2d_ams.*tray')
| selectattr('attributes.tag_uid','!=','')
| selectattr('attributes.tag_uid','!=',None)
| selectattr('attributes.tag_uid','!=','0000000000000000')
| list %}
{% set this_rfid = state_attr(entity, 'extra_rfid_tag_string2') %}
{% set active_trays = trays | selectattr('attributes.active', 'eq', true) | list %}
{% set match_count = trays | selectattr('attributes.tag_uid', 'eq', this_rfid) | list | length %}
{% set active_match = active_trays | selectattr('attributes.tag_uid', 'eq', this_rfid) | list | length > 0 %}
{% if active_match %}
mdi:play-circle
{% elif match_count > 0 %}
mdi:printer-3d
{% elif state_attr(entity, 'archived') == true %}
mdi:archive
{% elif state_attr(entity, 'klipper_active_spool') == true %}
mdi:check-circle
{% endif %}
badge_color: >
{% set trays = states.sensor
| selectattr('entity_id', 'search', 'bambu_h2d_ams.*tray')
| selectattr('attributes.tag_uid','!=','')
| selectattr('attributes.tag_uid','!=',None)
| selectattr('attributes.tag_uid','!=','0000000000000000')
| list %}
{% set this_rfid = state_attr(entity, 'extra_rfid_tag_string2') %}
{% set active_trays = trays | selectattr('attributes.active', 'eq', true) | list %}
{% set match_count = trays | selectattr('attributes.tag_uid', 'eq', this_rfid) | list | length %}
{% set active_match = active_trays | selectattr('attributes.tag_uid', 'eq', this_rfid) | list | length > 0 %}
{% if active_match %}
green
{% elif match_count > 0 %}
yellow
{% elif state_attr(entity, 'archived') == true %}
orange
{% elif state_attr(entity, 'klipper_active_spool') == true %}
green
{% else %}
default_color
{% endif %}
primary: |
{% set vendor = state_attr(entity, 'filament_vendor_name') %}
{% set name = state_attr(entity, 'filament_name') %}
{% set material = state_attr(entity, 'filament_material') %}
{% set location = state_attr(entity, 'location') %}
{% if vendor or name or material or location %}
{{ vendor if vendor else '' }} {{ name if name else '' }} {{ material if material else '' }} {{ '(' ~ location ~ ')' if location else '' }}
{% else %}
Informazioni non disponibili
{% endif %}
secondary: "{{ (state_attr(entity, 'remaining_weight') | float) | round(2) }} g"
tap_action:
action: more-info
sort:
method: attribute
attribute: filament_color_hex
numeric: false
reverse: false
card:
square: false
type: grid
card_param: cards
grid_options:
columns: 48
rows: auto
`