Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Octavian Ruda committed Feb 14, 2025
2 parents 203ba20 + 9cd1432 commit e837a5a
Show file tree
Hide file tree
Showing 1,144 changed files with 71,129 additions and 45,515 deletions.
4 changes: 3 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[run]
branch = True
# branch = True
branch = False

[report]
skip_empty = True
skip_covered = True
include = custom_components/*
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Tuya Local Dev",
"image": "mcr.microsoft.com/devcontainers/python:1-3.11-bullseye",
"image": "mcr.microsoft.com/devcontainers/python:1-3.13",
"postCreateCommand": "pip3 install --user -r requirements.txt",
"containerEnv": {
"DEVCONTAINER": "1"
Expand Down Expand Up @@ -72,4 +72,4 @@
"features": {
"rust": "latest"
}
}
}
17 changes: 13 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@ body:
- type: markdown
attributes:
value: |
This form is for reporting bugs with the integration or existing devices. Bug reports should be detailed with log messages or device diagnostics to help developers determine what is going wrong.
This form is for reporting bugs with the integration or existing devices. Bug reports should be detailed **with log messages or device diagnostics** to help developers determine what is going wrong.
**If you are reporting a deprecation message from the log, please check that the message is for an HA deprecation (telling you to report the issue here), and that there is not already [a bug](https://github.com/make-all/tuya-local/issues?q=is%3Aissue+is%3Aopen+label%3Amaintenance) for the issue.** Most likely the deprecation is new in the latest HA release, and will not be "fixed" in the integration until late in the month or the next month, as fixes generally are not backwards compatible with older HA versions. Other deprecation messages can be aimed at you, the end user, to prompt you to update automations etc. If the message is telling you an entity is deprecated, then you can disable the entity in Settings / Devices once you have adapted to use the replacement.
If you have a question, or are unsure if what you observe is really a bug, consider using [Discussions](https://github.com/make-all/tuya-local/discussions) instead.
If you are reporting an unsupported device, please use the **New Device** reporting template instead, which will guide you on the information required to make sure your request is not put into the "too hard" pile.
If you are reporting a device which is listed as supported, but cannot be added, please include the WARNING log message that contains a dps list, which is output during the detection stage. If you are not getting such a message, please see discussion \#522 for hints on resolving connection issues.
If you are intending to create a pull request, an issue is not required, but please clearly describe the reason for your PR in the description of the PR.
- type: textarea
Expand Down Expand Up @@ -58,12 +62,17 @@ body:
description: |
Please select if the following are applicable
options:
- label: I am sure this is a bug, or improvement that is well enough described that it can be implemented
- label: I am sure this is a bug or improvement, that is well enough described that it can be implemented.
required: true
- label: This report is for tuya-local, **not** for localtuya.
required: true
- label: |
If this is for a specific device, the device config is mentioned above, or diagnostics are included.
required: true
- label: This is not requesting addition of a new device
required: false
- label: |
Log messages or diagnostics relevant to the issue are included.
required: false
- label: This is not requesting addition of a new device.
required: true
validations:
required: true
24 changes: 12 additions & 12 deletions .github/ISSUE_TEMPLATE/new-device.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,34 @@ body:
attributes:
label: Log message
description: |
From the Home Assistant log (Settings / System /Log), please paste the Warning level log message containing a dps list which is output when you attempt to add the device and are presented with a list of non-matching devices.
From the Home Assistant log (Settings / System /Log), please paste the Warning level log message containing a **dps** list which is output when you attempt to add the device and are presented with a list of non-matching devices.
Alternatively, if you already added the device, you can turn on debug logging for a minute or so, and find a message in the log from your device which has `full_poll: true` as part of the message.
placeholder: Reports without logs will be immediately closed
render: text
validations:
required: true
- type: textarea
id: data_model
attributes:
label: DPS information
description: |
Preferred data is QueryThingsDataModel API result from iot.tuya.com (under Cloud / API Explorer / Device Control)
If you do not have access to iot.tuya.com, but have other ways of obtaining dps information, the minimum info required is the numeric dp id, name/description, data type, and for settable dps, the range for numeric values, and the list of possible values for enum values. If you cannot obtain this info, there is no way for us to support you, as only owners of devices have access to the data about them.
render: text
validations:
required: true
- type: input
id: productid
attributes:
label: Product ID
description: |
The product ID or productKey for the device.
You can get this from the same iot.tuya.com API functions that provide the local key or from `tinytuya scan` or other tools doing local discovery
You can get this from the HA log when using cloud assisted setup with tuya-local 2024.11.0 and later. Otherwise the same iot.tuya.com API functions that provide the local key or from `tinytuya scan` or other tools doing local discovery. **Do not provide your device id here, that is private info unique to your personal device.**
- type: input
id: productname
attributes:
label: Product Name
description: The product name (usually brand and model name/number)
- type: textarea
id: data_model
attributes:
label: DPS information
description: |
Preferred data is QueryThingsDataModel API result from iot.tuya.com (under Cloud / API Explorer / Device Control)
If you do not have access to iot.tuya.com, but have other ways of obtaining dps information, the minimum info required is the numeric dp id, name/description, data type, and for settable dps, the range for numeric values, and the list of possible values for enum values. If you cannot obtain this info, there is no way for us to support you, as only owners of devices have access to the data about them.
render: text
validations:
required: true
- type: textarea
id: info
attributes:
Expand Down
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'

- name: Install dependencies
run: |
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12']
python-version: ['3.13']

steps:
- uses: actions/checkout@v4
Expand All @@ -29,4 +29,13 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Full test with pytest
run: pytest --cov=. --cov-config=.coveragerc --cov-report xml:coverage.xml
run: pytest --cov=custom_components/tuya_local --cov-report term:skip-covered --junit-xml=test-results.xml
- name: Surface results
if: always()
uses: pmeier/pytest-results-action@main
with:
path: test-results.xml
summary: true
display-options: fEX
fail-on-empty: true
title: Test results
2 changes: 1 addition & 1 deletion .github/workflows/yamltests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12']
python-version: ['3.13']

steps:
- uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/.idea/
/.vscode/
/.env/
/*.egg-info/
__pycache__/
.pytest_cache/
/config/
Expand Down
Loading

0 comments on commit e837a5a

Please sign in to comment.