title: Salon
views:
  - title: Salon
    path: salon
    icon: mdi:sofa
    cards:
      - type: picture-elements
        image: /local/salon1.png
        elements:

          # ── Ring na suficie (centrum góra) ──────────────────────
          - type: state-icon
            entity: switch.ibsystem_rs0_id32_rs0_id32_output_do_2
            icon: mdi:ceiling-light
            tap_action:
              action: toggle
            style:
              top: 12%
              left: 50%

          - type: state-label
            entity: switch.ibsystem_rs0_id32_rs0_id32_output_do_2
            attribute: friendly_name
            prefix: ""
            suffix: ""
            tap_action:
              action: toggle
            style:
              top: 19%
              left: 50%
              font-size: 11px
              color: white
              background: rgba(0,0,0,0.5)
              border-radius: 4px
              padding: 2px 4px
              white-space: nowrap

          # ── Lampy za kanapą (prawa góra) ─────────────────────────
          - type: state-icon
            entity: switch.ibsystem_rs0_id32_rs0_id32_output_do_3
            icon: mdi:wall-sconce-flat
            tap_action:
              action: toggle
            style:
              top: 12%
              left: 80%

          - type: state-label
            entity: switch.ibsystem_rs0_id32_rs0_id32_output_do_3
            attribute: friendly_name
            tap_action:
              action: toggle
            style:
              top: 19%
              left: 80%
              font-size: 11px
              color: white
              background: rgba(0,0,0,0.5)
              border-radius: 4px
              padding: 2px 4px
              white-space: nowrap

          # ── Lampa przed TV (lewa góra) ───────────────────────────
          - type: state-icon
            entity: switch.ibsystem_rs0_id33_rs0_id33_output_do_0
            icon: mdi:floor-lamp
            tap_action:
              action: toggle
            style:
              top: 12%
              left: 15%

          - type: state-label
            entity: switch.ibsystem_rs0_id33_rs0_id33_output_do_0
            attribute: friendly_name
            tap_action:
              action: toggle
            style:
              top: 19%
              left: 15%
              font-size: 11px
              color: white
              background: rgba(0,0,0,0.5)
              border-radius: 4px
              padding: 2px 4px
              white-space: nowrap

          # ── LED sufit wnęka (góra, lekko z lewej) ───────────────
          - type: state-icon
            entity: switch.ibsystem_rs0_id33_rs0_id33_output_do_3
            icon: mdi:led-strip-variant
            tap_action:
              action: toggle
            style:
              top: 5%
              left: 35%

          - type: state-label
            entity: switch.ibsystem_rs0_id33_rs0_id33_output_do_3
            attribute: friendly_name
            tap_action:
              action: toggle
            style:
              top: 12%
              left: 35%
              font-size: 11px
              color: white
              background: rgba(0,0,0,0.5)
              border-radius: 4px
              padding: 2px 4px
              white-space: nowrap

          # ── LED dekoracyjne / pionowe na ścianie za kanapą ───────
          - type: state-icon
            entity: switch.ibsystem_rs0_id33_rs0_id33_output_do_2
            icon: mdi:led-strip
            tap_action:
              action: toggle
            style:
              top: 45%
              left: 50%

          - type: state-label
            entity: switch.ibsystem_rs0_id33_rs0_id33_output_do_2
            attribute: friendly_name
            tap_action:
              action: toggle
            style:
              top: 52%
              left: 50%
              font-size: 11px
              color: white
              background: rgba(0,0,0,0.5)
              border-radius: 4px
              padding: 2px 4px
              white-space: nowrap

          # ── LED (dookoła sufitu) ──────────────────────────────────
          - type: state-icon
            entity: switch.ibsystem_rs0_id33_rs0_id33_output_do_1
            icon: mdi:led-variant-on
            tap_action:
              action: toggle
            style:
              top: 5%
              left: 65%

          - type: state-label
            entity: switch.ibsystem_rs0_id33_rs0_id33_output_do_1
            attribute: friendly_name
            tap_action:
              action: toggle
            style:
              top: 12%
              left: 65%
              font-size: 11px
              color: white
              background: rgba(0,0,0,0.5)
              border-radius: 4px
              padding: 2px 4px
              white-space: nowrap

          # ── Przycisk WSZYSTKIE OFF ────────────────────────────────
          - type: icon
            icon: mdi:lightbulb-group-off
            tap_action:
              action: call-service
              service: switch.turn_off
              target:
                entity_id:
                  - switch.ibsystem_rs0_id32_rs0_id32_output_do_2
                  - switch.ibsystem_rs0_id32_rs0_id32_output_do_3
                  - switch.ibsystem_rs0_id33_rs0_id33_output_do_0
                  - switch.ibsystem_rs0_id33_rs0_id33_output_do_1
                  - switch.ibsystem_rs0_id33_rs0_id33_output_do_2
                  - switch.ibsystem_rs0_id33_rs0_id33_output_do_3
            style:
              top: 93%
              left: 92%
              color: white
              background: rgba(200,0,0,0.6)
              border-radius: 50%
              padding: 6px

      - type: entities
        title: "Salon - lista"
        entities:
          - entity: switch.ibsystem_rs0_id32_rs0_id32_output_do_2
            name: "S1 Ring"
          - entity: switch.ibsystem_rs0_id32_rs0_id32_output_do_3
            name: "S2 Lampy za kanapą"
          - entity: switch.ibsystem_rs0_id33_rs0_id33_output_do_0
            name: "Lampa przed TV"
          - entity: switch.ibsystem_rs0_id33_rs0_id33_output_do_1
            name: "LED"
          - entity: switch.ibsystem_rs0_id33_rs0_id33_output_do_2
            name: "LED dekoracyjne"
          - entity: switch.ibsystem_rs0_id33_rs0_id33_output_do_3
            name: "LED sufit wnęka"
