#๐๐ผ I'm playing with adding some Tuya
1 messages ยท Page 1 of 1 (latest)
Related question - is anyone able to run pre-commit run --all-files locally? For me it's hanging on pylint
Here's some git scripting in case it's helpful to anyone else:
cd /root/homeassistant/custom_components
mkdir core
cd core
git init
git remote add -f origin https://github.com/EvanSchalton/core.git
git config core.sparseCheckout true
echo "homeassistant/components/tuya/" >> .git/info/sparse-checkout
git pull origin master
mv /root/homeassistant/custom_components/core/homeassistant/components/tuya/ /root/homeassistant/custom_components/tuya
rm -r /root/homeassistant/custom_components/core
Welp, that's the wrong thing -- it's being recognized as a custom component, but won't load
This is interesting the async_setup_entry ConfigEntry is being sent the refresh token instead of the API connection details
๐๐ผ I'm playing with adding some Tuya components and want to run the code on my server for integration testing - my understanding is I can clone the Tyua directory from my fork into a custom components and restart the server and it'll load my code instead of the core package -- if that's not correct / there's a better way please let me know.
Set up a development environment to test and develop, as documented in our developer documentation.
There is no need to run it on all files. If you really want to, you can, but it will take a while
That seems counter productive? (You don't need custom components)
Yeah, I stopped running on everything. Re not using a custom_component - what's the preferred method? I didn't see relevant docs and tried to run home assistant in the dev container and it hangs
In the dev container HA should just run; most contributors use dev containers
to run HA in a dev env: just hit F5 to start Home Assistant in the vscode debugger
Ahh cool okay, thanks
Is there a straight forward way to load data from a home assistant backup? It'd be great to not have to reconfigure things for testing
It is a core installation, so I guess you can restore parts of the config folder to achieve that
but in general, you'd carry forward your development environment and don't set up stuff much
as in, I still carry forward my config/dev env that I've set up in 2019 ๐คทโโ๏ธ
I'm trying to test the Tuya changes; I'd ideally like to load my existing connection -- I can manually unpack the tar though
Just set up the integration in your dev env?
it is like scanning a single code to auth it ๐คทโโ๏ธ
It's a little more involved -- copying secrets, access id, username & password -- but fair enough
The Tuya integration doesn't use those anymore?
Mhmm, it does for me
On the core branch that's what it asked for -- are you thinking about TuyaLocal perhaps?
No
The Tuya integration has changed a few releases ago
and now scans a QR code using your Tuya or SmartLife App
secrets, access id, usernames & password have been removed
So, no sure what you are working with, but it might possibly well be an outdated branch
๐คฆ๐ผโโ๏ธ I thought I forked the repo for the first time yesterda, but nope -- it's a REALLY old fork
hehe stuff happens ๐
@opal hollow I noticed with the switch to tuya_shared the API changed from openapi.tuyaus.com to apigw.tuyaus.com and some of the responses are truncated - is there a known workaround?
That library is maintained by Tuya
If you have questions on their library, you should ask them ๐
Sure - I just didn't know if you'd seen anyone else work around it in the components
I think I'm just going to port my changes over to Tuya Local instead ๐คท