nervetattoo / simple-thermostat

A different take on the thermostat card for Home Assistant ♨️

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error viewing card

Rossigg opened this issue · comments

I can't display in a collapsable card a simple thermostat. If I take it outside and put in a simple and clear dashboard, it works, but inside another custom card no.
I opened the browser console and see this error

Log from browser console:
simple-thermostat.js?hacstag=158654878250:292 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'states') at set hass (simple-thermostat.js?hacstag=158654878250:292:19712) at CollapsableCards.createCardElement (collapsable-cards.js?hacstag=364978303070:167:16) at collapsable-cards.js?hacstag=364978303070:38:54 at Array.map (<anonymous>) at CollapsableCards.renderCard (collapsable-cards.js?hacstag=364978303070:38:33) set hass @ simple-thermostat.js?hacstag=158654878250:292 createCardElement @ collapsable-cards.js?hacstag=364978303070:167 (anonymous) @ collapsable-cards.js?hacstag=364978303070:38 renderCard @ collapsable-cards.js?hacstag=364978303070:38

This will fix it
- type: custom:simple-thermostat
entity: climate.weau
layout:
step: row
# mode:
# headings: false
header: false
control:
hvac:
_name: Operation

Unfortunately this doesn't change anything. But the abnormal thig is that in edit mode I can see correctly the card, is in dashboard mode that create this error.

The code of my dashboard:
type: vertical-stack
cards:

  • type: button
    tap_action:
    action: navigate
    navigation_path: /lovelace-mobile
    icon: mdi:arrow-left-thick
    icon_height: 30px
    hold_action:
    action: none
    show_name: false
  • type: entities
    entities:
    • entity: switch.100134c8ab
      icon: mdi:pump
    • type: divider
    • entity: switch.100178141f
      icon: mdi:pump
      name: Piano 0
    • entity: switch.10017815f4
      name: Piano 1
      icon: mdi:pump
    • entity: switch.10017406b6
      icon: mdi:pump
      name: Piano 2
    • type: divider
    • entity: switch.1001ea88ba
      icon: mdi:pump
    • type: section
    • entity: binary_sensor.sensori_caldaia_channel_1_input
      name: Selettore manuale
      icon: ''
      secondary_info: none
      state_color: true
      title: Interruttori
  • type: custom:collapsable-cards
    title: Termosifoni
    cards:
    • type: custom:simple-thermostat
      entity: climate.termosifone_studio
      header:
      name: Studio
      icon: mdi:heat-wave
      layout:
      step: row
      hide:
      state: true
      control: false
    • type: custom:simple-thermostat
      entity: climate.termosifone_soggiorno
      header:
      name: Soggiorno
      icon: mdi:heat-wave
      layout:
      step: row
      hide:
      state: true
      control: false
    • type: custom:simple-thermostat
      entity: climate.termosifone_camera_matrimoniale
      header:
      name: Corridoio
      icon: mdi:heat-wave
      layout:
      step: row
      hide:
      state: true
      control: false
  • type: custom:collapsable-cards
    title: Programmazione
    cards:
    • type: custom:scheduler-card
      include:
      • switch.100134c8ab
      • switch.10017406b6
      • switch.10017406d4
      • switch.100178141f
      • switch.10017815f4
      • switch.1001ea88ba
        exclude: []
        title: Caldaia
        discover_existing: false
        time_step: 5
        sort_by:
      • title
        display_options:
        primary_info: default
        secondary_info:
        • days
          icon: action
          show_header_toggle: false
    • type: custom:scheduler-card
      include:
      • climate
        exclude: []
        discover_existing: false
        time_step: 5
        title: Termosifoni
        sort_by:
      • title
        display_options:
        primary_info: default
        secondary_info:
        • days
          icon: action

sorry I was not answering your question my mistake. But if I was you I would start a new dashbaord and add a card at a time to see which one breaks it.

not working on me