Giter Site home page Giter Site logo

Setup CLI issues about ha-component-kit HOT 10 CLOSED

yann510 avatar yann510 commented on July 23, 2024
Setup CLI issues

from ha-component-kit.

Comments (10)

shannonhochkins avatar shannonhochkins commented on July 23, 2024 1

I see the issue, the ThemeProvider must be included within HassConnect, which is most likely a problem with my template not something you've done wrong!

Sorry about that! Just move it inside HassConnect and you should be good to go!

from ha-component-kit.

shannonhochkins avatar shannonhochkins commented on July 23, 2024 1

Legend! thanks, mate! Honestly, this project can achieve a lot, which makes its learning curve a little steep, but hopefully, my docs and the typescript nature helps you figure everything out :) Happy coding!

from ha-component-kit.

shannonhochkins avatar shannonhochkins commented on July 23, 2024 1

Just an FYI - i made some further improvements here as i noticed a few other problems, even once deployed, it never loaded correctly because it was missing the base config value for vite.

#87

Thanks for bringing this all to my attention - hopefully this works well for others going forward!

I've noted all the changes I made after you made yours in the linked PR above

from ha-component-kit.

shannonhochkins avatar shannonhochkins commented on July 23, 2024

Hi mate, you need to run npm install followed by npm run dev.

When the wizard asked you, did you include your home assistant url correctly?

Can you publish what you've got to npm so I can review please? Obviously, exclude your .env file and the link to your public home assistant instance.

The first error happens when you attempt to use a component or hook outside of HassConnect

As for the second issue, I'll take a look at that, I may not have included the deploy script correctly but thankyou for reporting it!

from ha-component-kit.

yann510 avatar yann510 commented on July 23, 2024

Thanks for the quick reply. Yes, I had run the npm install, and forgot to add it in the repro steps (they are now updated).

Here is the repro code: https://github.com/yann510/home-assistant-dashboard
With the .env content:

VITE_FOLDER_NAME=home-assistant-dashboard
VITE_HA_URL=http://homeassistant.local:8123
VITE_HA_TOKEN=
VITE_SSH_USERNAME=
VITE_SSH_PASSWORD=
VITE_SSH_HOSTNAME=

from ha-component-kit.

shannonhochkins avatar shannonhochkins commented on July 23, 2024

With HassConnect, when using an insecure url (http) there's an option you must enable, have a look at the docs for HassConnect

This may not be your problem as I do throw an error when a non https url is provided without this flag

Have you ran a console log on the vite import for the HAAS_url inside app.tsx to see if it's coming though?

Is there any other errors in the console? It's 11pm here so I'll have to test this out a bit later, your setup looks correct at a glance, please hold tight I'll get back to you when I can :)

from ha-component-kit.

yann510 avatar yann510 commented on July 23, 2024

It seems that setting the option to allowNonSecure: true got me a bit further.
I have also logged the HAAS_url and it is well imported from the .env

Although, I'm still seeing the same error:
image

Have a good night, I'll try to look at the source code to see if I can find anything on my own :)

from ha-component-kit.

yann510 avatar yann510 commented on July 23, 2024

That has fixed my issue!! <3
I can create a PR if you'd like.

I guess for the deploy part, all you need to do is add the deploy.ts script inside the package.json scripts?

from ha-component-kit.

shannonhochkins avatar shannonhochkins commented on July 23, 2024

Awesome!

You've nudged me to go take another pass at the create script, there's a few things It's missing that I can automate for users, glad to see the typescript sync worked for you too!

I'll sort it all out It's a bit complicated to work with the repository, but if you feel like it, go for it! I'd love the help, been flying solo on this for a long time now, and I have no idea if the developer / contributor docs are up to scratch without prior knowledge, so I wouldn't mind some feedback if you decide to do so!

from ha-component-kit.

yann510 avatar yann510 commented on July 23, 2024

Cool, I'll give it a go today and provide feedback as I explore the repository in more detail, I am glad to help you and this project out :)

from ha-component-kit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.