thomasloven / lovelace-template-entity-row

🔹 Display whatever you want in an entities card row.
MIT License
210 stars 16 forks source link

Error on 0.117.0b4 beta #43

Closed jazbraz closed 3 years ago

jazbraz commented 3 years ago
arch x86_64
chassis vm
dev false
docker true
docker_version 19.03.11
hassio true
host_os HassOS 4.15
installation_type Home Assistant OS
os_name Linux
os_version 5.4.72
python_version 3.8.6
supervisor 249
timezone Europe/Stockholm
version 0.117.0b4
virtualenv false

Message: Logger: frontend.js.latest.202010212 Source: components/system_log/init.py:193 First occurred: 8:30:57 (9 occurrences) Last logged: 8:30:57

http://xxxxxxxxxxx:8123/hacsfiles/lovelace-template-entity-row/template-entity-row.js:1:2531 Uncaught TypeError: i.replace is not a function

Mariusthvdb commented 3 years ago

not sure if I see a related issue, but indeed since the betas in 117: 8 in a row at/around day change:

2020-10-28 00:26:37 ERROR (MainThread) [frontend.js.latest.202010212] https://mydomain.org:1234/local/lovelace/resources/lovelace-template-entity-row/template-entity-row.js?v=1.1.0:1:2538 TypeError: undefined is not a function (near '...i.replace(/_\([^)]*\)/g,t=>s().localize(t.substring(2,t.length-1))||t)...')

must originate from

  - type: custom:decluttering-card
    template: event_date
    variables:
      - entity: sensor.birthday_marijn

and 7 others using this decluttering card:

card:
  type: custom:template-entity-row
  entity: '[[entity]]'
  state: >
    {{states(config.entity)}} {{state_attr(config.entity, 'unit_of_measurement')}}
  secondary: >
    {{state_attr('[[entity]]','type')}}: {{state_attr('[[entity]]','original_date')}}
jazbraz commented 3 years ago

Thanks @thomasloven. Works again and perfect job as always.