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

Stack and conditional cards. Help please!

$
0
0

@D4VEW557 wrote:

Hi,
I am massively struggling to get conditional cards to work inside a vertical stack card… I can create vertical/horizontal stack cards and conditional cards but I can not get them to work together.

My cards are as follows.

card:
  elements:
    - entity: input_select.floorplan_floor
      icon: mdi-close
      image: /local/custom_ui/floorplan/trans_square.png
      style:
        border: 2px solid red
        left: 33.5%
        top: 10%
        width: 6%
      tap_action:
        action: call-service
        service: input_select.select_next
        service_data:
          entity_id: input_select.floorplan_floor
      type: image
    - entity: switch.on_off
      style:
        '--paper-item-icon-color': black
        left: 77.3%
        top: 46.%
        transform: scale(5)
      tap_action:
        action: toggle
      type: state-icon
    - entity: switch.low
      style:
        '--paper-item-icon-color': orange
        left: 77.3%
        top: 61%
        transform: scale(4)
      tap_action:
        action: toggle
      type: state-icon
    - entity: switch.high
      style:
        '--paper-item-icon-color': red
        left: 77.3%
        top: 30%
        transform: scale(4)
      tap_action:
        action: toggle
      type: state-icon
    - entity: input_select.floorplan_floor
      style:
        '--paper-item-icon-color': black
        left: 19%
        top: 30%
        transform: scale(4)
      tap_action:
        action: call-service
        service: input_select.select_next
        service_data:
          entity_id: input_select.floorplan_floor
      type: state-icon
  image: /local/custom_ui/floorplan/fire_card1.png
  type: picture-elements
conditions:
  - entity: input_select.floorplan_floor
    state: 1st Floor
panel: true
type: conditional
card:
  elements:
    - entity: device_tracker.d4vew557_davess9_2
      hold_action: none
      state_image:
        home: /local/Bear.jpg
        not_home: /local/Bear_away.jpg
      style:
        left: 5%
        top: 9%
        width: 10%
      tap_action: none
      type: image
    - entity: switch.power
      hold_action: none
      state_image:
        'off': /local/custom_ui/floorplan/porch_over.png
        'on': /local/custom_ui/floorplan/trans_square.png
      style:
        left: 14%
        top: 67%
        width: 21%
      tap_action: none
      type: image
    - entity: switch.power
      hold_action: none
      state_image:
        'off': /local/custom_ui/floorplan/passage_over.png
        'on': /local/custom_ui/floorplan/trans_square.png
      style:
        left: 30.2%
        top: 38.3%
        width: 34%
      tap_action: none
      type: image
    - entity: switch.power
      hold_action: none
      state_image:
        'off': /local/custom_ui/floorplan/kitchen_over.png
        'on': /local/custom_ui/floorplan/trans_square.png
      style:
        left: 33.4%
        top: 67.6%
        width: 42%
      tap_action: none
      type: image
    - entity: switch.power
      hold_action: none
      state_image:
        'off': /local/custom_ui/floorplan/cupboard_over.png
        'on': /local/custom_ui/floorplan/trans_square.png
      style:
        left: 47%
        top: 25.%
        width: 10%
      tap_action: none
      type: image
    - entity: switch.power
      hold_action: none
      state_image:
        'off': /local/custom_ui/floorplan/garden_over.png
        'on': /local/custom_ui/floorplan/trans_square.png
      style:
        left: 88%
        top: 36.%
        width: 18%
      tap_action: none
      type: image
    - entity: switch.livingroomlight
      hold_action: none
      state_image:
        'off': /local/custom_ui/floorplan/patio_over.png
        'on': /local/custom_ui/floorplan/trans_square.png
      style:
        left: 80.4%
        top: 35.%
        width: 18%
      tap_action: none
      type: image
    - entity: switch.livingroomlight
      hold_action: none
      state_image:
        'off': /local/custom_ui/floorplan/livingroom.png
        'on': /local/custom_ui/floorplan/trans_square.png
      style:
        left: 50%
        top: 50%
        width: 100%
      tap_action: none
      type: image
    - entity: cover.front_blinds
      hold_action: none
      state_image:
        closed: /local/custom_ui/floorplan/passage_blind_closed_over.png
        open: /local/custom_ui/floorplan/passage_blind_open_over.png
      style:
        left: 17.7%
        top: 43%
        width: 22.5%
      tap_action: none
      type: image
    - entity: binary_sensor.front_door
      hold_action: none
      state_image:
        'off': /local/custom_ui/floorplan/front_door_closed_over.png
        'on': /local/custom_ui/floorplan/front_door_open_over1.png
      style:
        left: 13.8%
        top: 66.8%
        width: 20.5%
      tap_action: none
      type: image
    - entity: switch.livingroomlight
      image: /local/custom_ui/floorplan/trans_square.png
      style:
        border: 2px solid red
        left: 62%
        top: 39%
        width: 6%
      tap_action:
        action: toggle
      type: image
    - entity: switch.livingroomlight
      image: /local/custom_ui/floorplan/trans_square.png
      style:
        border: 2px solid red
        left: 82%
        top: 33.4%
        width: 6%
      tap_action:
        action: toggle
      type: image
    - entity: switch.power
      image: /local/custom_ui/floorplan/trans_square.png
      style:
        border: 2px solid red
        left: 91%
        top: 47.5%
        width: 6%
      tap_action:
        action: toggle
      type: image
    - entity: switch.power
      image: /local/custom_ui/floorplan/trans_square.png
      style:
        border: 2px solid red
        left: 47%
        top: 25%
        width: 6%
      tap_action:
        action: toggle
      type: image
    - entity: switch.power
      image: /local/custom_ui/floorplan/trans_square.png
      style:
        border: 2px solid red
        left: 34%
        top: 67%
        width: 6%
      tap_action:
        action: toggle
      type: image
    - entity: switch.power
      image: /local/custom_ui/floorplan/trans_square.png
      style:
        border: 2px solid red
        left: 33.5%
        top: 43%
        width: 6%
      tap_action:
        action: toggle
      type: image
    - entity: switch.power
      image: /local/custom_ui/floorplan/trans_square.png
      style:
        border: 2px solid red
        left: 10.5%
        top: 51%
        width: 6%
      tap_action:
        action: toggle
      type: image
    - entity: switch.on_off
      style:
        '--paper-item-icon-color': black
        left: 65.%
        top: 61.%
        transform: scale(2)
      tap_action:
        action: toggle
      type: state-icon
    - entity: switch.low
      style:
        '--paper-item-icon-color': black
        left: 60%
        top: 63.5%
        transform: scale(2)
      tap_action:
        action: toggle
      type: state-icon
    - entity: switch.high
      style:
        '--paper-item-icon-color': black
        left: 70.5%
        top: 58.5%
        transform: scale(2)
      tap_action:
        action: toggle
      type: state-icon
    - entity: input_select.floorplan_floor
      image: /local/custom_ui/floorplan/trans_square.png
      style:
        border: 2px solid red
        left: 33.5%
        top: 10%
        width: 6%
      tap_action:
        action: call-service
        service: input_select.select_next
        service_data:
          entity_id: input_select.floorplan_floor
      type: image
    - entity: binary_sensor.motion1
      icon: 'mdi:run'
      style:
        '--paper-item-icon-active-color': '#ff0000'
        background-color: 'rgba(25, 25, 25, 0.3)'
        border-radius: 50%
        left: 68.5%
        top: 5.5%
        transform: scale(1.8)
      type: state-icon
  image: /local/custom_ui/floorplan/floorplan6.png
  type: picture-elements
conditions:
  - entity: input_select.floorplan_floor
    state: 2nd Floor
type: conditional

This is the start off my floor plan.
any help getting these into a conditional horizontal card would be much appreciated.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 96121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>