Skip to content

Generic Card

Description

example-image

This is the generic-card to display values from a sensor, eg. to show humidity, your next waste collection date or whatever sensor value is provided.

Variables

Variable Default Required Notes
entity
ulm_card_generic_name Set custom Name
ulm_card_generic_icon Set custom Icon

Usage

- type: 'custom:button-card'
  template: card_generic
  entity: sensor.next_waste_collection
Template Code
card_generic.yaml
---
### Card Generic ###
card_generic:
  template:
    - "icon_more_info_new"
    - "ulm_actions_card"
    - "ulm_translation_engine"
  variables:
    ulm_card_generic_icon: "[[[ return entity.attributes.icon ]]]"
    ulm_card_generic_name: "[[[ return entity.attributes.friendly_name ]]]"
  custom_fields:
    item1:
      card:
        type: "custom:button-card"
        template:
          - "icon_more_info"
        custom_fields:
          item1:
            card:
              type: "custom:button-card"
              entity: "[[[ return entity.entity_id ]]]"
              variables:
                ulm_input_select_option: "[[[ return variables.ulm_input_select_option; ]]]"
                ulm_input_select: "[[[ return variables.ulm_input_select; ]]]"
              icon: "[[[ return variables.ulm_card_generic_icon; ]]]"
              styles:
                icon:
                  - color: "rgba(var(--color-theme),0.9)"
          item2:
            card:
              type: "custom:button-card"
              entity: "[[[ return entity.entity_id ]]]"
              variables:
                ulm_input_select_option: "[[[ return variables.ulm_input_select_option; ]]]"
                ulm_input_select: "[[[ return variables.ulm_input_select; ]]]"
              name: "[[[ return variables.ulm_translation_state_unit ]]]"
              label: "[[[ return variables.ulm_card_generic_name ]]]"