maxwroc/battery-state-card

Cannot read properties of undefined (reading 'attributes')

ecto1a2003 opened this issue · 0 comments

Describe the bug
TypeError: Cannot read properties of undefined (reading 'attributes')
at http://homeassistant.local:8123/hacsfiles/battery-state-card/battery-state-card.js?hacstag=256292682321:35:12024
at Array.find ()
at http://homeassistant.local:8123/hacsfiles/battery-state-card/battery-state-card.js?hacstag=256292682321:35:12001
at qt. (http://homeassistant.local:8123/hacsfiles/battery-state-card/battery-state-card.js?hacstag=256292682321:35:12171)
at Generator.next ()
at http://homeassistant.local:8123/hacsfiles/battery-state-card/battery-state-card.js?hacstag=256292682321:1:633
at new Promise ()
at e (http://homeassistant.local:8123/hacsfiles/battery-state-card/battery-state-card.js?hacstag=256292682321:1:378)
at qt.internalUpdate (http://homeassistant.local:8123/hacsfiles/battery-state-card/battery-state-card.js?hacstag=256292682321:35:9851)
at qt. (http://homeassistant.local:8123/hacsfiles/battery-state-card/battery-state-card.js?hacstag=256292682321:35:2155)

YAML configuration

type: custom:battery-state-card
title: Batteries
sort:
  - state
collapse: 5
color_gradient:
  - '#ff0000'
  - '#ffff00'
  - '#00ff00'
tap_action:
  action: more-info
filter:
  include:
    - name: entity_id
      value: sensor.*batt*
  exclude:
    - name: entity_id
      value: sensor.*health*
    - name: entity_id
      value: sensor.*ford*
    - name: entity_id
      value: sensor.*battery_temperature*
    - name: entity_id
      value: sensor.*battery_power*
    - name: entity_id
      value: sensor.*state*
    - name: entity_id
      value: sensor.qnap*
    - name: state
      value: 15
      operator: '>'
entities:
  - entity: sensor.steamdeck_power
    name: SteamDeck
    charging_state:
      entity_id: binary_sensor.steaamdeck_is_charging
      state: 'on'
  - entity: sensor.vacuum
    name: Jenkins Battery Level
    charging_state:
      attribute:
        name: phase
        value: Charge
  - entity: sensor.no_3113_battery_level
    name: NO-3113 Battery Level
    charging_state:
      entity_id: vacuum.no_3113
      status: Charging
  - entity: sensor.pke_meter_battery_level
    name: PKE Battery
    charging_state:
      entity_id: binary_sensor.pke_meter_is_charging
      state: 'on'
  - entity: sensor.jennie_flip_battery_level_2
    name: Jennie Flip
    charging_state:
      entity_id: binary_sensor.jennie_flip_is_charging_2
      state: 'on'
  - entity: sensor.tobins_spirit_guide_battery_level
    name: Tobins Spirit Guide battery
    charging_state:
      entity_id: binary_sensor.tobins_spirit_guide_is_charging
      state: 'on'

Entity debug data

Dev console errors

Screenshots

Version
v3.2.1