thomasloven / lovelace-card-mod

🔹 Add CSS styles to (almost) any lovelace card
MIT License
1.04k stars 169 forks source link

Debug showing (Re)connecting over and over again in #363

Open rubin110 opened 3 months ago

rubin110 commented 3 months ago

My Home Assistant version: 2024.2.5

My lovelace configuration method (GUI or yaml): GUI

What I am doing: Attempting to debug issues possibly related to #354, where after some reloads of the page none of my custom styles are loading, I enabled debug: in order to get some logs.

What I expected to happen: Honestly I don't know.

What happened instead: My browser's debug console is flooded with CardMod Debug: (Re)connecting, multiple per second. Concerned this isn't normal behavior and that something is stuck in a loop somewhere. Searching the repo for this error only turned up the bit of code that produces it, and I'm having a hard time deciphering it's intent, I cannot find any other documentation about it.

My apologies if what's happening here is normal and common knowledge.

Minimal steps to reproduce:

type: custom:mushroom-climate-card
entity: climate.thermostat
layout: vertical
fill_container: true
show_temperature_control: true
hvac_modes:
  - heat
  - cool
  - fan_only
  - 'off'
collapsible_controls: true
icon: ''
card_mod:
  debug: true
  style: |
    :host {
      --mush-icon-size: 2.87em !important;
      --mush-icon-symbol-size: 2.5em !important;
      --mush-badge-size: 1.6em !important;
      --mush-badge-icon-size: 1.1em !important;
    }

Error messages from the browser console:

card-mod.js?hacstag=190927524342:1 CardMod Debug: (Re)connecting <card-mod slot=​"none" card-mod-type=​"card" style=​"display:​ none;​">​…​</card-mod>​
card-mod.js?hacstag=190927524342:1 CardMod Debug: (Re)connecting <card-mod slot=​"none" card-mod-type=​"card" style=​"display:​ none;​">​…​</card-mod>​
card-mod.js?hacstag=190927524342:1 CardMod Debug: (Re)connecting <card-mod slot=​"none" card-mod-type=​"card" style=​"display:​ none;​">​…​</card-mod>​

By putting an X in the boxes ([]) below, I indicate that I: