Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95919

Assistance combining 2 working cards

$
0
0

@nellicus wrote:

I am attempting to combine 2 cards that work independently. I can’t seem to get the spacing and indentation correct to add them to a vertical stack. Is there a tool or rune of thumb/tricks to this. I was able to work with it before the style of the text changed from the examples on the docs to being mucked by the interface editor.

Top Half

cards:
  - color: 'rgb(117, 117, 117)'
    color_type: label-card
    name: Media Mode
    type: 'custom:button-card'
  - cards:
      - color_type: icon
        entity: input_select.theater_media_mode
        hold_action:
          action: none
        icon: 'mdi:television'
        label: TV
        show_icon: true
        show_label: true
        show_name: false
        show_state: false
        size: 60%
        state:
          - color: 'rgb(20, 120, 220)'
            value: TV
        tap_action:
          action: call-service
          service: input_select.select_option
          service_data:
            entity_id: input_select.theater_media_mode
            option: TV
        type: 'custom:button-card'
      - color_type: icon
        entity: input_select.theater_media_mode
        hold_action:
          action: none
        icon: 'mdi:projector'
        label: Projector
        show_icon: true
        show_label: true
        show_name: false
        show_state: false
        size: 60%
        state:
          - color: 'rgb(20, 120, 220)'
            value: Projector
        tap_action:
          action: call-service
          service: input_select.select_option
          service_data:
            entity_id: input_select.theater_media_mode
            option: Projector
        type: 'custom:button-card'
      - card:
          color: 'rgb(255, 0, 0)'
          color_type: icon
          entity: remote.theater
          hold_action:
            action: none
          icon: 'mdi:power'
          label: Power Off
          show_icon: true
          show_label: true
          show_name: false
          show_state: false
          size: 60%
          tap_action:
            action: call-service
            service: remote.turn_off
            service_data:
              entity_id: remote.theater
          type: 'custom:button-card'
        conditions:
          - entity: remote.theater
            state_not: 'off'
        type: conditional
    type: horizontal-stack
type: vertical-stack

Bottom Half

card:
  cards:
    - cards:
        - card:
            color_type: card
            entity: switch.tv_appletv
            entity_picture: /local/Apple-TV.svg
            show_entity_picture: 'true'
            show_name: true
            show_state: false
            state:
              - color: 'rgb(20, 120, 220)'
                value: 'on'
            type: 'custom:button-card'
          conditions:
            - entity: input_select.theater_media_mode
              state: TV
          type: conditional
        - card:
            color_type: card
            entity: switch.prj_appletv
            entity_picture: /local/Apple-TV.svg
            show_entity_picture: 'true'
            show_name: true
            show_state: false
            state:
              - color: 'rgb(20, 120, 220)'
                value: 'on'
            type: 'custom:button-card'
          conditions:
            - entity: input_select.theater_media_mode
              state: Projector
          type: conditional
        - card:
            color_type: card
            entity: switch.tv_shield
            entity_picture: /local/Nvidia-01.svg
            show_entity_picture: 'true'
            show_name: true
            show_state: false
            state:
              - color: 'rgb(20, 120, 220)'
                value: 'on'
            type: 'custom:button-card'
          conditions:
            - entity: input_select.theater_media_mode
              state: TV
          type: conditional
        - card:
            color_type: card
            entity: switch.prj_shield
            entity_picture: /local/Nvidia-01.svg
            show_entity_picture: 'true'
            show_name: true
            show_state: false
            state:
              - color: 'rgb(20, 120, 220)'
                value: 'on'
            type: 'custom:button-card'
          conditions:
            - entity: input_select.theater_media_mode
              state: Projector
          type: conditional
        - card:
            color_type: card
            entity: switch.tv_raspberrypi
            entity_picture: /local/Raspberry-PI-01.svg
            show_entity_picture: 'true'
            show_name: true
            show_state: false
            state:
              - color: 'rgb(20, 120, 220)'
                value: 'on'
            type: 'custom:button-card'
          conditions:
            - entity: input_select.theater_media_mode
              state: TV
          type: conditional
        - card:
            color_type: card
            entity: switch.prj_raspberrypi
            entity_picture: /local/Raspberry-PI-01.svg
            show_entity_picture: 'true'
            show_name: true
            show_state: false
            state:
              - color: 'rgb(20, 120, 220)'
                value: 'on'
            type: 'custom:button-card'
          conditions:
            - entity: input_select.theater_media_mode
              state: Projector
          type: conditional
      type: horizontal-stack
    - cards:
        - card:
            color_type: card
            entity: switch.tv_wallhdmi
            entity_picture: /local/Settings-input-hdmi-01.svg
            show_entity_picture: 'true'
            show_name: true
            show_state: false
            state:
              - color: 'rgb(20, 120, 220)'
                value: 'on'
            type: 'custom:button-card'
          conditions:
            - entity: input_select.theater_media_mode
              state: TV
          type: conditional
        - card:
            color_type: card
            entity: switch.prj_wallhdmi
            entity_picture: /local/Settings-input-hdmi-01.svg
            show_entity_picture: 'true'
            show_name: true
            show_state: false
            state:
              - color: 'rgb(20, 120, 220)'
                value: 'on'
            type: 'custom:button-card'
          conditions:
            - entity: input_select.theater_media_mode
              state: Projector
          type: conditional
      type: horizontal-stack
  type: vertical-stack
conditions:
  - entity: input_select.theater_media_mode
    state_not: None
type: conditional

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 95919

Trending Articles