custom-cards / stack-in-card

🛠 group multiple cards into one card without the borders
MIT License
262 stars 24 forks source link

core Markdown/Picture-entity card results in Cannot read property 'replaceChild' of null #7

Open Mariusthvdb opened 4 years ago

Mariusthvdb commented 4 years ago

Checklist:

Release with the issue: 0.1.0 Last working release (if known): not sure Browser and Operating System: Chrome on Mac, Safari on Mac

Description of problem:

no matter how I configure the top markdown card in the stack, inspector always show below error on this Lovelace config:

type: custom:stack-in-card
cards:
  - type: markdown
    title: |
      Home Assistant --> Google Assistant
      Voice commands
    style: |
      ha-card {background: url('/local/various/google_assistant.png');
               background-size: cover;
               --keep-background: true;}
    content: |

      Ok/Hey Google,
      --> <i>'activity/mode'</i> <b>activeren</b>
      --> <b>turn-on/off</b> <i>'switch/verlichting'</i>
      --> <i>'switch/verlichting'</i> <b>in-/uitschakelen</b>
  - type: entities
    show_header_toggle: false
    entities:
   etc etc

Javascript errors shown in the web inspector (if applicable):

safari:

Schermafbeelding 2020-04-23 om 13 27 53

chrome:

Schermafbeelding 2020-04-23 om 13 29 03

Additional information: thought the errors doesnt seem to point to stack-in-card, Ive been able to positively identify this to only happen on the view with this markdown bit in the config. also see community post: https://community.home-assistant.io/t/frontend-error-on-logfile/41519/26?u=mariusthvdb

Mariusthvdb commented 4 years ago

update:

same goes for the stack-in-card with a picture-entity or picture card:

  - type: custom:stack-in-card
    cards:
#      - type: picture-entity
#        entity: light.kantoor_lights
#        name: Kantoor
#        image: /local/images/kantoor.png
#        state_filter:
#          'off': grayscale(72%)
#        tap_action:
#          action: toggle
#        hold_action:
#          action: more-info
      - type: glance
        entities:
          - entity: light.office_inside
            tap_action:
              action: toggle
          - entity: light.bureau_left
            tap_action:
              action: toggle
          - entity: light.bureau_right
            tap_action:
              action: toggle
          - entity: light.office_outside
            tap_action:
              action: toggle

or:

  - type: custom:stack-in-card
    cards:
#      - type: picture
#        image: /local/images/nmbs.png
#        hold_action:
#          action: url
#          url_path: https://www.belgiantrain.be/nl
      - type: entities
        style: |
          ha-card {
            --ha-card-background: rgb(0,100,182);
            color: rgb(217,242,251);
            --keep-background: true;
          }
        title: Nmbs reizen
        show_header_toggle: false
        entities:
          - sensor.essen_brussel_noord
          - sensor.brussel_noord_essen
          - sensor.roosendaal_essen
          - sensor.essen_roosendaal

          - sensor.nmbs_live_brussel_noord
          - sensor.nmbs_live_essen

without comments, this config results in the mentioned error in the title, even though the card shows just fine with the picture-entity.

Schermafbeelding 2020-04-23 om 17 11 42

when commented , the view shows 100% error free.

added info: the errors appear upon page refresh. If is simply 'tabbing' to another view/tab, the error doesn't show.