Comments (10)
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.
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.
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.
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.
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.
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.
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.
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:
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.
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.
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.
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)
- Entity icon only updates when refreshing the page HOT 5
- TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" HOT 17
- Problem using the dashboard in companion app HOT 28
- Modal - Animation Control HOT 1
- Discord link is expired HOT 1
- Vacuum Card - New card to control Vacuum entities HOT 1
- Prevent sidebar/group collapsing HOT 5
- POC - Swap store to signals HOT 1
- Multi lingal HOT 1
- Option to disable animations HOT 5
- Authorization request after each page refresh HOT 7
- access to HA without logging in (use token) HOT 4
- AlarmCard
- Card title and description HOT 3
- useDevice hook HOT 6
- Style rgb variables for error/warning/success HOT 4
- Deploy docs update: SSH add-on HOT 3
- Theme provider flashes HOT 1
- ThemeProvider - precompile and make more dynamic
- useTemplate
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ha-component-kit.