DBuit / light-popup-card

Lovelace card to use as custom pop-up for light in homekit style
168 stars 38 forks source link

actions: option bad indentation issue #83

Closed damiano75 closed 2 years ago

damiano75 commented 2 years ago

Hi, when I add the actions: option in the popup card I have an error message about bad indentation from the previous line. In the code below the bad indentation error starts at "settings:true" line, if I remove the actions: section there isn't any error. Could please help me to find where I'm wrong?

    popup_cards:
      light.striscia_led:
        title: My popup
        style:
          $: |
            .mdc-dialog .mdc-dialog__container {
              width: 50%;
            }
            .mdc-dialog .mdc-dialog__container .mdc-dialog__surface {
              width:50%;
              box-shadow:none;
            }
          .: |
            :host {
              --mdc-theme-surface: rgba(0,0,0,0);
              --secondary-background-color: rgba(0,0,0,0);
              --ha-card-background: rgba(0,0,0,0);
              --mdc-dialog-scrim-color: rgba(0,0,0,0.8);
              --mdc-dialog-min-height: 70%;
              --mdc-dialog-min-width: 70%;
              --mdc-dialog-max-width: 70%;
            }
            mwc-icon-button {
              color: #FFF;
            }
        card:
          type: custom:light-popup-card
          entity: light.striscia_led
          icon: mdi:led-strip
          actionsInARow: 2
          brightnessWidth: 150px
          brightnessHeight: 400px
          switchWidth: 150px
          switchHeight: 400px
          settings: true
          actions:
            - action:call-service
              service: scene.turn_on
              service_data:
                entity_id: scene.cucina_relax
              color: "#FDCA64"
              name: Relax

The error:

image

damiano75 commented 2 years ago

YAML needs a space between "action:" and "call-service". Now it works

addrum commented 2 years ago

@DBuit would be good to update the readme example with this fix!