custom-cards / decluttering-card

🧹 Declutter your lovelace configuration with the help of this card
MIT License
386 stars 30 forks source link

Thermostat card not showing the "set-temperature" until it change (from clean start) #35

Closed SeLLeRoNe closed 3 years ago

SeLLeRoNe commented 3 years ago

Checklist:

Release with the issue: Always had the issue. Last working release (if known): N/A Browser and Operating System: Chrome 89.0.4389.82 and Firefox 86.0 on Windows 10

Description of problem: On every startup, and this is true up until the set-temperature change, the themrostat card doesn't show the set-temperature value. It does start to appear the moment that temperature change. I've also noticed, that if you run multiple thermostat-card in the same view, only the first one is affected (for the same entities) while the other simply show the value

To show the set-temperature at all time. Javascript errors shown in the web inspector (if applicable):

Additional information: My config: thermostat view

title: Thermostat
icon: mdi:home-thermometer
panel: true
path: thermostat
cards:
  - type: custom:layout-card
    layout: vertical
    cards:
      - type: custom:decluttering-card
        template: thermostat_card
        variables:
          - title: House
          - area: house
      - break
      - type: custom:decluttering-card
        template: thermostat_card
        variables:
          - title: House
          - area: house

Thermostat Card (technically is more complex, but this is the bare minimum to replicate the issue)

---
thermostat_card:
  card:
    type: custom:stack-in-card
    mode: vertical
    cards:
      - type: custom:decluttering-card
        template: title
        variables:
          - title: '[[title]]'
      - type: thermostat
        icon: mdi:thermometer-lines
        entity: climate.[[area]]
        name: " "

Outcome: image As you can see, the first doesn't have the "18.0 Idle" text, while the second does (no changes ofc, they are literally the same code :) )

SeLLeRoNe commented 3 years ago

Info that might be worth something, on load it seems that the value are showed for a split-second to then disappear

SeLLeRoNe commented 3 years ago

Ok, it seems that now it's fixed somehow.. maybe the original issue was coming from the layout-card since it's the only other card that was on that view and has been updated recently.