thomasloven / lovelace-template-entity-row

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

Cast: Cannot read property 'hass' of null #7

Closed Mariusthvdb closed 4 years ago

Mariusthvdb commented 4 years ago

Seems Cast has issues with the card?

  - type: entities
    title: Entity templates!
    show_header_toggle: false
    entities:
      - sensor.hue_capabilities
      - type: custom:template-entity-row
        icon: >
          mdi:weather-{{'sunny' if is_state('sun.sun','above_horizon') else 'night'}}
        name: >
          Goede {{'dag' if is_state('sun.sun','above_horizon') else 'nacht'}}
        state: >
          {{states('sun.sun')}}
        condition: "{{is_state('device_tracker.life360_marijn', 'home')}}"
        secondary: >
          Marijn is {{states('device_tracker.life360_marijn')}}
        active: "{{ is_state('device_tracker.life360_marijn', 'home') }}"

shows fine on regular Lovelace, but errors red with:

Cannot read property 'hass' of null
Schermafbeelding 2020-01-10 om 11 11 29

please have a look? thanks

thomasloven commented 4 years ago

Please let me know if this worked. I can't test cast stuff myself...

Mariusthvdb commented 4 years ago

really sorry but unfortunately no, it doesn't work yet. Must confess I am never 100% sure Chrome uses the latest cards, but Ive deleted cache and quit and restarted Chrome. Still the red card with the same error

thomasloven commented 4 years ago

I bought a Nest Hub yesterday for money from the Buymecoffee link. Got almost all cards working. Fixes should be coming soon.

thomasloven commented 4 years ago

Actually, template-entity-row is already working for me.

I think you should be able to clear the cache by adding a version number as suggested in the linked installation instructions, and then stop and restart the cast.

Mariusthvdb commented 4 years ago

sure, that's what I always do:

# https://github.com/thomasloven/lovelace-template-entity-row
- url: /local/lovelace/resources/template-entity-row.js?v=271caca
  type: module

seems to have kicked in after all, I see the card fine now, thanks!