Skip to content

Request help for writing configs for custom devices #1131

Answered by make-all
Artjosh asked this question in Q&A
Discussion options

You must be logged in to vote

Each entity type has specific requirements for the naming of the dps inside them. These requirements are listed in custom_components/tuya_local/devices/README.md

There is a pytest test in tests/test_device_config.py that can catch issues like this, with 20 devices in your plans, I would recommend getting pytest working locally.

I think the following should work (first line is only required the first time you do this):

pip install -r requirements-dev.txt
pytest tests/test_device_config.py

It is also recommended to use venv, if you are doing other python development then you should already be familiar with that, but if this is the only thing you are using python for, then messing up your g…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by Artjosh
Comment options

You must be logged in to vote
1 reply
@make-all
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
new device Unsupported device
2 participants
Converted from issue

This discussion was converted from issue #1129 on October 01, 2023 02:28.