kalkih / mini-graph-card

Minimalistic graph card for Home Assistant Lovelace UI
MIT License
3.06k stars 238 forks source link

HA 2022.8.2 instructions don't seem to be working #826

Closed Bart56 closed 2 years ago

Bart56 commented 2 years ago

I installed with HACS. js file is in config/www/community/mini-graph-card/

configuration.yaml file has: `lovelace: resources:

I've tried type: module and I've also tried url: /local/mini-graph-card-bundle.js, and others.

When I try to add a card using the gui, it does not show up as a choice, so I try to add it manual card and I get: `Custom element doesn't exist: mini-graph-card. type: custom:mini-graph-card entities:

It's not clear from the instructions what else I should be doing but I did follow the 4 items listed if having errors. I have restarted HA many times, but it seems as though the gui editor does not know about the custom card. HACS shows it as installed. Else, if you prefer the graphical editor, use the menu to add the resource: Instructions say: Make sure, advanced mode is enabled in your user profile (click on your user name to get there) [This is done] Navigate to Configuration -> Lovelace Dashboards -> Resources Tab. Hit orange (+) icon >>>[This does not exist in 2022.8.2} Enter URL /local/mini-graph-card-bundle.js and select type "JavaScript Module". (Use /hacsfiles/mini-graph-card/mini-graph-card-bundle.js and select "JavaScript Module" for HACS install)

Note: I put the .js file in each of the directories config/www, config/www/community/, and config/www/community/mino-grapg-card/ I also put this in my config file: `lovelace: resources:

Can this be clarified for the current HA version?

Epeedelorage commented 2 years ago

Hello,

Same for me Core 2022.8.2 break my mini graphs 😭

Thx for ur help

silverl commented 2 years ago

Here to report the same.

Chrome Dev Tools is reporting '500 Internal Server Error\n\nServer got itself in trouble'

Bart56 commented 2 years ago

UPDATE:

Sometime overnight last night, the mini-graph-card started working. I did not reboot. I was using that particular lovelace page yesterday and since I left the card on it showing the error, I went back to the page today and there was a graph.

Since it was a minimal configuration, I decided to edit it. It showed the 2 lines of yaml code:

type: custom:mini-graph-card
entities: 
  - sensor.cpu_temp_f

But it would no longer let me edit manually showing the note: No visual editor available for type 'custom:mini-graph-card'.

So I can't say this is a bug, but simply inexplicable behavior. Thanks.

ildar170975 commented 2 years ago

type: custom:mini-graph-card entities: sensor.house_temp

Wrong code. Ref docs for a proper usage.

Bart56 commented 2 years ago

Sorry - I did follow the docs. Just to clarify, that wasn't the code I used. I did use the proper code.

type: custom:mini-graph-card
entities:
  - sensor.cpu_temp_f

But my point is that it wasn't working by not recognizing the custome type, then something caused it to start working. Since I followed the docs and it didn't work, I felt that I was doing something wrong and that it should be clarified if 2022.8.2 needed some changes. Unfortunately, I do not know what made it work. thanks for the quick response. I'll edit my previous comment to reflect this.

ildar170975 commented 2 years ago

@Bart56 I edited your comments to format a code. I did it in a couple of places only - and you fix it in rest of your comments by yourself. Please insert a code into triple "`" - otherwise in most cases it is impossible to analyse a code. I myself even do not start analysing a code if it is unformatted. This is not a paid customers support, people helping in a spare time, so please help them to help you.

But it would no longer let me edit manually showing the note: No visual editor available for type 'custom:mini-graph-card'.

The issue from the 1st post - is "why card is not found - although I declared it". The issue mentioned here - is "why there is no UI to create/edit the card". These are different issues.


First, about 2nd issue. What I see when I select a "mini-graph-card" from a list of cards: image

YES - the card does not have a possibility to edit itself via UI. Currently it is editable via yaml only. I myself do not consider this as a bug. This is just a lack of functionality.

Do not afraid of using yaml. Yes, there is a current trend "let's use only UI-manageable integrations & deprecate yaml-settings" - which is hated by many people. But anyway you still have to use yaml a lot. For example - to setup custom cards.

A small hack for you since you do not like yaml:

  1. Add a conventional history-graph.
  2. Add your entities, specify "hours_to_show" & "title": image Then edit the code: image Then change it for mini-graph-card: image Next add all needed options from the docs.

Next about 1st issue. Try using HACS. I have never edited resources by myself. This is what HACS is supposed to do.

Bart56 commented 2 years ago

Agreed. Thanks for the feedback. The last change I made was to put multiple copies in several directories as I mentioned above. But it still didn't work. I wish I knew why it started working overnight but I think you can close this issue.

On Wed, Aug 17, 2022, 5:02 PM ildar170975 @.***> wrote:

@Bart56 https://github.com/Bart56 I edited your comments to format a code. Please insert a code into triple "`" - otherwise in most cases it is impossible to analyse a code.

But it would no longer let me edit manually showing the note: No visual editor available for type 'custom:mini-graph-card'.

What I see when I select a "mini-graph-card" from a list of cards: [image: image] https://user-images.githubusercontent.com/71872483/185241533-4e658524-1703-4852-8e9c-a0f46264f9d8.png

YES - the card does not have a possibility to edit itself via UI. Currently it is editable via yaml only. I myself do not consider this as a bug. This is just a lack of functionality.

Do not afraid of using yaml. Yes, there is a current trend "let's use only UI-manageable integrations & deprecate yaml-settings" - which is hated by many people. But anyway you still have to use yaml a lot. For example - to setup custom cards.

— Reply to this email directly, view it on GitHub https://github.com/kalkih/mini-graph-card/issues/826#issuecomment-1218487510, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALDAL324RKYIIAABNVVVAP3VZVHPNANCNFSM56O4S45Q . You are receiving this because you were mentioned.Message ID: @.***>

ildar170975 commented 2 years ago

but I think you can close

No, this is what YOU should do if you think that your issue is resolved.

Bart56 commented 2 years ago

Oops - got it. Thanks!