panbachi / tankerkoenig-card

Lovelace-Card for Tankerkoenig-Component
MIT License
16 stars 13 forks source link

Does not work since HA 2022.4.0b0 #13

Open bussio opened 2 years ago

bussio commented 2 years ago

With the card, the entities created by the Tanker King integration are no longer displayed.

jaegerschnitzel commented 2 years ago

Quick fix for me was to delete "&& this.isOpen(station)" on line 102. But I guess the whole card needs to be adjusted to the changes introduced in 2022.04: https://github.com/home-assistant/core/pull/68925

tLupus1978 commented 2 years ago

for me, this is not solving the issue (HA 2022.4.0) - seems the card still does not show any values although sensor data is available:

image
KrX3D commented 2 years ago

you also need to comment out the line (44?)

if(!this.isOpen(station) && this.config.show_closed !== true) return;

tLupus1978 commented 2 years ago

I added in line 86 this - and then (clear browser cache + remove GZ file)

    isOpen(station) {
        return true;

this helped. Thanks!

(this is only a hack - sadly no fix I think.

szoller commented 2 years ago

Thanks for the "hack", do I still see when stations are closed then?

napsio commented 2 years ago

It is fixed now, but you have to add the station state binary_sensor manually to your card config (see readme)

carsten-h commented 2 years ago

It is fixed now

I added the state binary_sensor manually to the card configuration and it worked for a few days. But now the complete card is not longer shown in the dashbard. This is the part of my config:

        name: Benzinpreise
        show:
          - e5
        show_closed: true
        show_header: false
        stations:
          - name: Kolenfelder Straße
            brand: Star
            e5: sensor.tankerkoenig_star_tankstelle_e5
            state: binary_sensor.star_kolenfelder_strasse_4a_status

This is added to the configuration.yaml:

    - url: /hacsfiles/tankerkoenig-card/tankerkoenig-card.js
      type: module

I deleted the card completely, reinstalled it, restarted HA, but nothing is shown. I also reloaded the resources, cleared the browser cache etc. The card is simply not there.

If I am using this:

        title: Benzin
        entities:
          - entity: sensor.tankerkoenig_star_tankstelle_e5
          - entity: binary_sensor.star_kolenfelder_strasse_4a_status

I am getting this: Bildschirmfoto 2022-05-05 um 08 44 30

LinusHoppe commented 2 years ago

The error occurs in my environment too (Home Assistant Core 2022.5.5).

Sensor values are fine: sensor state

Adding this gas station to my lovelace card, I get the following error: Uncaught (in promise) TypeError: this.hass.states[b[key]] is undefined in tankerkoenig-card.js:32:16 30-05-_2022_08-11-04

Nguimjeu commented 2 years ago

I'm having the same issues.