artem-sedykh / mini-climate-card

Minimalistic climate card for Home Assistant Lovelace UI
MIT License
262 stars 19 forks source link

Install troubles with HA 2022.6.5 #88

Closed Munsio closed 2 years ago

Munsio commented 2 years ago

I do have a install problem where the entity does not show up in the entity chooser when trying to add a card neither when adding it manually.

HA: 2022.6.5 Hacs: 1.25.5 Mini Climate Card: 2.1.3

After installing the repo with HACS i ensured that the JS is loaded inside the resources tab of the "Dashboards" menu. I am able to access the JS directly with the URL inside the resources menu. I reloaded my Browser and I do have confirmed that in the developer tools the "MINI-CLIMATE-CARD v2.1.3" badge shows up inside the console view.

But still no luck in having the card to show up on the dashboard itself. When I configured it by hand it always shows that the custom entity is not available.

If you need more info please let me know.

regevbr commented 2 years ago

what do you mean by entity chooser there is no UI config flow for this library.... Can you please send the configuration you used? Also, please run in the console the command:

customElements.get('mini-climate')

and let me know if you get a class instance or undefined?

Munsio commented 2 years ago

Alright thanks for the info and I figured it out too.

When using the UI-Config flow and use the "Manual" option do not add the - in front of the type. Then it is working like expected. Got confused with the examples provided by the readme.

And I was able to "add" a UI flow by simply adding the following code i copied from the "mini-graph-card" after the customElements.define("mini-climate", He) part in the bundled JS.

window.customCards = window.customCards || [],
window.customCards.push({
  type: 'mini-climate',
  name: 'Mini Climate',
  preview: !1,
  description: 'My Mini Climate'
})

Would be a nice feature to have for the next update.

Anyway everything is resolved. Thanks.

regevbr commented 2 years ago

@Munsio thanks for your suggestions - I released a new version that supports adding the card from the card picker and I also updated the readme to avoid mistakes