Skip to content

Input_boolean Card

Description

example-image

The input-boolean-card is to switch an input_boolean on or off.

Variables

Variable Default Required Notes
entity
ulm_card_input_boolean_name Set custom Name
ulm_card_input_boolean_icon Set custom Icon

Usage

- type: 'custom:button-card'
  template: card_input_boolean
  entity: input_boolean.guest_mode
  variables:
    ulm_card_input_boolean_name: Guest Mode
Template Code
card_input_boolean.yaml
---
### Card Input Boolean ###
card_input_boolean:
  template:
    - "icon_more_info_new"
    - "ulm_actions_card"
    - "ulm_translation_engine"
    - "blue"
  variables:
    ulm_card_input_boolean_icon: "[[[ return entity.attributes.icon ]]]"
    ulm_card_input_boolean_name: "[[[ return entity.attributes.friendly_name ]]]"
  custom_fields:
    item1:
      card:
        type: "custom:button-card"
        template:
          - "icon_more_info"
          - "blue"
        custom_fields:
          item1:
            card:
              type: "custom:button-card"
              template:
                - "blue"
              variables:
                ulm_input_select_option: "[[[ return variables.ulm_input_select_option; ]]]"
                ulm_input_select: "[[[ return variables.ulm_input_select; ]]]"
              entity: "[[[ return entity.entity_id ]]]"
              icon: "[[[ return variables.ulm_card_input_boolean_icon; ]]]"
          item2:
            card:
              type: "custom:button-card"
              template:
                - "blue_no_card"
              variables:
                ulm_input_select_option: "[[[ return variables.ulm_input_select_option; ]]]"
                ulm_input_select: "[[[ return variables.ulm_input_select; ]]]"
              entity: "[[[ return entity.entity_id ]]]"
              name: "[[[ return variables.ulm_card_input_boolean_name; ]]]"
              label: "[[[ return variables.ulm_translation_state ]]]"