vasqued2 / ha-teamtracker-card

A Home Assistant frontend custom card that will display real-time updates for teams tracked with the ha-teamtracker integration. Has custom in-game layouts for football, baseball, basketball, hockey, soccer, golf, tennis, racing, and mma.
GNU General Public License v3.0
71 stars 16 forks source link

Lovelace card not showing up in card selection #4

Closed screwzloose closed 1 year ago

screwzloose commented 1 year ago

Running into an issue where the Team Tracker Card is not showing up as an available lovelace card in the Add Card page.

  1. Installed the Team Tracker Card into Lovelace via the current repo.

  2. Added to the configuration.yaml:

    url: /hacsfiles/ha-teamtracker-card/ha-teamtracker-card.js
    type: module

    I will note, Type has to be set to "module" and not "Javascript Module" otherwise HA will spit out the following error:

`The system cannot restart because the configuration is not valid: Invalid config for [lovelace]: value must be one of ['css', 'html', 'js', 'module'] for dictionary value @ data['lovelace']['resources'][1]['type']. Got 'Javascript Module'. (See /config/configuration.yaml, line 4).
  1. Restarted HA

  2. Attempted to Add Card via the card selection, but the card does not exist.

  3. Multiple restarts, removed/replaced the Team Tracker Card from the Frontend in HACS. Still not showing up.

Using: Hacs 1.27.2 Frontend version: 20220906112053

Home Assistant 2022.9.5 Supervisor 2022.09.1 Operating System 9.0 Frontend 20220907.2 - latest

vasqued2 commented 1 year ago

It looks like you are confusing several different things. I'll try to walk you through it. First, did you install via HACS or did you install manually?

screwzloose commented 1 year ago

Ugh, if I'm n00bing it up and wasting your time, my apologies. I hope not.

I have Team Tracker Card installed via HACS. (HACS > Frontend > Team Tracker Card (Lovelace)).

I also Team Tracker (from your repo) installed via HA Integrations and have defined a team when I added to integrations.

vasqued2 commented 1 year ago

No worries.

If you installed the card via HACS, I think the README has some old info and you don't need to add the lines to your resources any more.

You can confirm by going to Settings/Dashboards, and then clicking on the three dots menu in the upper right. If HACS added it, you should see it listed. If not, click the Add Resource button on the bottom right and add the info.

If it was already added, please let me know and I will update the README to take that part out.

Then, assuming you have the sensor created from the integration (either through the UI or via YAML), you should just need to add the card to your Dashboard.

The card type teamtracker-card won't show up. You have to select Type "Manual". Then paste in the following where it asks you to type in your YAML.

type: 'custom:teamtracker-card'
entity: sensor.team_tracker

where sensor.team_tracker is whatever you called your sensor.

Let me know if you have problems and we can track it down.

screwzloose commented 1 year ago

HACS did install it. I think the key here was I didn't know I needed to add a Manual card and then enter code into the YAML for the card. I was under the impression the card would be available to select, I was wrong.

Sure enough, both my sensors are working just fine. Thanks again.

vasqued2 commented 1 year ago

Great news! I'll clarify in the readme.

vasqued2 commented 1 year ago

Updated the README to show that you do not need to add the Resources if adding via HACS and to make it clear you should add via a Manual card.