wyzeapy 0.5.29__tar.gz → 0.5.31__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/.github/CODEOWNERS +3 -3
  2. wyzeapy-0.5.31/.github/workflows/auto-approve.yml +19 -0
  3. wyzeapy-0.5.31/.github/workflows/auto-assign.yml +25 -0
  4. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/.github/workflows/codeql.yml +13 -7
  5. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/.github/workflows/lint.yml +6 -3
  6. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/.github/workflows/pre-release.yml +6 -3
  7. wyzeapy-0.5.31/.github/workflows/publish.yml +33 -0
  8. wyzeapy-0.5.31/.github/workflows/scorecard.yml +78 -0
  9. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/.github/workflows/test.yml +7 -4
  10. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/.gitignore +1 -0
  11. wyzeapy-0.5.31/.pre-commit-config.yaml +18 -0
  12. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/PKG-INFO +4 -4
  13. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/README.md +3 -3
  14. wyzeapy-0.5.31/SECURITY.md +79 -0
  15. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/pyproject.toml +5 -5
  16. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/src/wyzeapy/__init__.py +10 -0
  17. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/src/wyzeapy/payload_factory.py +34 -0
  18. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/src/wyzeapy/services/base_service.py +111 -0
  19. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/src/wyzeapy/services/bulb_service.py +25 -4
  20. wyzeapy-0.5.31/src/wyzeapy/services/irrigation_service.py +246 -0
  21. wyzeapy-0.5.31/src/wyzeapy/tests/test_irrigation_service.py +732 -0
  22. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/src/wyzeapy/types.py +9 -0
  23. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/src/wyzeapy/utils.py +14 -4
  24. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/uv.lock +6 -6
  25. wyzeapy-0.5.29/.github/workflows/publish.yml +0 -36
  26. wyzeapy-0.5.29/bin/act +0 -0
  27. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/.coveragerc +0 -0
  28. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/.github/dependabot.yml +0 -0
  29. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/.reuse/dep5 +0 -0
  30. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/CHANGELOG.md +0 -0
  31. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/LICENSES/GPL-3.0-only.txt +0 -0
  32. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/docs/index.html +0 -0
  33. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/docs/search.js +0 -0
  34. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/docs/wyzeapy/const.html +0 -0
  35. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/docs/wyzeapy/crypto.html +0 -0
  36. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/docs/wyzeapy/exceptions.html +0 -0
  37. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/docs/wyzeapy/payload_factory.html +0 -0
  38. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/docs/wyzeapy/services/base_service.html +0 -0
  39. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/docs/wyzeapy/services/bulb_service.html +0 -0
  40. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/docs/wyzeapy/services/camera_service.html +0 -0
  41. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/docs/wyzeapy/services/hms_service.html +0 -0
  42. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/docs/wyzeapy/services/lock_service.html +0 -0
  43. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/docs/wyzeapy/services/sensor_service.html +0 -0
  44. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/docs/wyzeapy/services/switch_service.html +0 -0
  45. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/docs/wyzeapy/services/thermostat_service.html +0 -0
  46. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/docs/wyzeapy/services/update_manager.html +0 -0
  47. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/docs/wyzeapy/services/wall_switch_service.html +0 -0
  48. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/docs/wyzeapy/services.html +0 -0
  49. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/docs/wyzeapy/types.html +0 -0
  50. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/docs/wyzeapy/utils.html +0 -0
  51. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/docs/wyzeapy/wyze_auth_lib.html +0 -0
  52. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/docs/wyzeapy.html +0 -0
  53. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/scripts/create_pre_release.sh +0 -0
  54. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/src/wyzeapy/const.py +0 -0
  55. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/src/wyzeapy/crypto.py +0 -0
  56. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/src/wyzeapy/exceptions.py +0 -0
  57. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/src/wyzeapy/services/__init__.py +0 -0
  58. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/src/wyzeapy/services/camera_service.py +0 -0
  59. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/src/wyzeapy/services/hms_service.py +0 -0
  60. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/src/wyzeapy/services/lock_service.py +0 -0
  61. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/src/wyzeapy/services/sensor_service.py +0 -0
  62. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/src/wyzeapy/services/switch_service.py +0 -0
  63. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/src/wyzeapy/services/thermostat_service.py +0 -0
  64. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/src/wyzeapy/services/update_manager.py +0 -0
  65. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/src/wyzeapy/services/wall_switch_service.py +0 -0
  66. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/src/wyzeapy/wyze_auth_lib.py +0 -0
  67. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/tests/__init__.py +0 -0
  68. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/tests/test_bulb_service.py +0 -0
  69. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/tests/test_camera_service.py +0 -0
  70. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/tests/test_hms_service.py +0 -0
  71. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/tests/test_lock_service.py +0 -0
  72. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/tests/test_payload_factory.py +0 -0
  73. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/tests/test_sensor_service.py +0 -0
  74. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/tests/test_switch_service.py +0 -0
  75. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/tests/test_thermostat_service.py +0 -0
  76. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/tests/test_types.py +0 -0
  77. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/tests/test_update_manager.py +0 -0
  78. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/tests/test_utils.py +0 -0
  79. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/tests/test_wall_switch_service.py +0 -0
  80. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/tests/test_wyze_auth_lib.py +0 -0
  81. {wyzeapy-0.5.29 → wyzeapy-0.5.31}/tests/test_wyzeapy.py +0 -0
@@ -1,8 +1,8 @@
1
- # Lines starting with ‘#’ are comments.
1
+ # Lines starting with '#' are comments.
2
2
  # Each line is a file pattern followed by one or more owners.
3
3
 
4
4
  # These owners will be the default owners for everything in the repo.
5
- * @JoshuaMulliken
5
+ * @SecKatie
6
6
 
7
7
  # Order is important. The last matching pattern has the most precedence.
8
8
  # So if a pull request only touches javascript files, only these owners
@@ -10,4 +10,4 @@
10
10
  # *.js @octocat @github/js
11
11
 
12
12
  # You can also use email addresses if you prefer.
13
- # docs/* docs@example.com
13
+ # docs/* docs@example.com
@@ -0,0 +1,19 @@
1
+ name: Auto Approve Owner PRs
2
+
3
+ on:
4
+ pull_request_target:
5
+ types: [opened, synchronize, reopened]
6
+
7
+ permissions:
8
+ pull-requests: write
9
+
10
+ jobs:
11
+ auto-approve:
12
+ runs-on: ubuntu-latest
13
+ # Only auto-approve PRs from the repository owner
14
+ if: github.event.pull_request.user.login == github.repository_owner
15
+ steps:
16
+ - name: Auto Approve
17
+ uses: hmarr/auto-approve-action@8f929096a962e83ccdfa8afcf855f39f12d4dac7 # v4
18
+ with:
19
+ github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,25 @@
1
+ name: Auto Assign Issues
2
+
3
+ on:
4
+ issues:
5
+ types: [opened]
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ jobs:
11
+ assign:
12
+ runs-on: ubuntu-latest
13
+ permissions:
14
+ issues: write
15
+ steps:
16
+ - name: Assign issue to SecKatie
17
+ uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
18
+ with:
19
+ script: |
20
+ await github.rest.issues.addAssignees({
21
+ owner: context.repo.owner,
22
+ repo: context.repo.repo,
23
+ issue_number: context.issue.number,
24
+ assignees: ['SecKatie']
25
+ });
@@ -11,6 +11,9 @@ on:
11
11
  schedule:
12
12
  - cron: '0 0 * * *'
13
13
 
14
+ permissions:
15
+ contents: read
16
+
14
17
  jobs:
15
18
  analyze:
16
19
  name: Analyze
@@ -28,21 +31,23 @@ jobs:
28
31
 
29
32
  strategy:
30
33
  fail-fast: false
31
-
34
+ matrix:
35
+ language: [ 'python' ]
32
36
 
33
37
  steps:
34
38
  - name: Checkout repository
35
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v3
39
+ uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
36
40
 
37
41
  # Initializes the CodeQL tools for scanning.
38
42
  - name: Initialize CodeQL
39
- uses: github/codeql-action/init@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3
40
-
43
+ uses: github/codeql-action/init@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4
44
+ with:
45
+ languages: ${{ matrix.language }}
41
46
 
42
47
  # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
43
48
  # If this step fails, then you should remove it and run the build manually (see below)
44
49
  - name: Autobuild
45
- uses: github/codeql-action/autobuild@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3
50
+ uses: github/codeql-action/autobuild@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4
46
51
 
47
52
  # Command-line programs to run using the OS shell.
48
53
  # See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -55,5 +60,6 @@ jobs:
55
60
  # ./location_of_script_within_repo/buildscript.sh
56
61
 
57
62
  - name: Perform CodeQL Analysis
58
- uses: github/codeql-action/analyze@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3
59
-
63
+ uses: github/codeql-action/analyze@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4
64
+ with:
65
+ category: "/language:${{matrix.language}}"
@@ -6,20 +6,23 @@ on:
6
6
  pull_request:
7
7
  branches: [ main, develop ]
8
8
 
9
+ permissions:
10
+ contents: read
11
+
9
12
  jobs:
10
13
  lint:
11
14
  runs-on: ubuntu-latest
12
15
 
13
16
  steps:
14
- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
17
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4
15
18
 
16
19
  - name: Set up Python
17
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
20
+ uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v5
18
21
  with:
19
22
  python-version: '3.11'
20
23
 
21
24
  - name: Install uv
22
- uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
25
+ uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
23
26
 
24
27
  - name: Install dependencies
25
28
  run: |
@@ -5,19 +5,22 @@ on:
5
5
  branches:
6
6
  - release/*
7
7
 
8
+ permissions:
9
+ contents: read
10
+
8
11
  jobs:
9
12
  test-publish:
10
13
  runs-on: ubuntu-latest
11
14
 
12
15
  steps:
13
- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
16
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4
14
17
 
15
- - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
18
+ - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v5
16
19
  with:
17
20
  python-version: "3.12"
18
21
 
19
22
  - name: Install uv
20
- uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v4
23
+ uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v4
21
24
  with:
22
25
  enable-cache: true
23
26
 
@@ -0,0 +1,33 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ jobs:
11
+ publish:
12
+ runs-on: ubuntu-latest
13
+ environment: release
14
+ permissions:
15
+ id-token: write # Required for trusted publishing
16
+
17
+ steps:
18
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4
19
+
20
+ - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v5
21
+ with:
22
+ python-version: "3.12"
23
+
24
+ - name: Install uv
25
+ uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v4
26
+ with:
27
+ enable-cache: true
28
+
29
+ - name: Build distribution
30
+ run: uv build
31
+
32
+ - name: Publish package to PyPI
33
+ run: uv publish
@@ -0,0 +1,78 @@
1
+ # This workflow uses actions that are not certified by GitHub. They are provided
2
+ # by a third-party and are governed by separate terms of service, privacy
3
+ # policy, and support documentation.
4
+
5
+ name: Scorecard supply-chain security
6
+ on:
7
+ # For Branch-Protection check. Only the default branch is supported. See
8
+ # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
9
+ branch_protection_rule:
10
+ # To guarantee Maintained check is occasionally updated. See
11
+ # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
12
+ schedule:
13
+ - cron: '29 2 * * 4'
14
+ push:
15
+ branches: [ "main" ]
16
+
17
+ # Declare default permissions as read only.
18
+ permissions: read-all
19
+
20
+ jobs:
21
+ analysis:
22
+ name: Scorecard analysis
23
+ runs-on: ubuntu-latest
24
+ # `publish_results: true` only works when run from the default branch. conditional can be removed if disabled.
25
+ if: github.event.repository.default_branch == github.ref_name || github.event_name == 'pull_request'
26
+ permissions:
27
+ # Needed to upload the results to code-scanning dashboard.
28
+ security-events: write
29
+ # Needed to publish results and get a badge (see publish_results below).
30
+ id-token: write
31
+ # Uncomment the permissions below if installing in a private repository.
32
+ # contents: read
33
+ # actions: read
34
+
35
+ steps:
36
+ - name: "Checkout code"
37
+ uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
38
+ with:
39
+ persist-credentials: false
40
+
41
+ - name: "Run analysis"
42
+ uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
43
+ with:
44
+ results_file: results.sarif
45
+ results_format: sarif
46
+ # (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
47
+ # - you want to enable the Branch-Protection check on a *public* repository, or
48
+ # - you are installing Scorecard on a *private* repository
49
+ # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional.
50
+ # repo_token: ${{ secrets.SCORECARD_TOKEN }}
51
+
52
+ # Public repositories:
53
+ # - Publish results to OpenSSF REST API for easy access by consumers
54
+ # - Allows the repository to include the Scorecard badge.
55
+ # - See https://github.com/ossf/scorecard-action#publishing-results.
56
+ # For private repositories:
57
+ # - `publish_results` will always be set to `false`, regardless
58
+ # of the value entered here.
59
+ publish_results: true
60
+
61
+ # (Optional) Uncomment file_mode if you have a .gitattributes with files marked export-ignore
62
+ # file_mode: git
63
+
64
+ # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
65
+ # format to the repository Actions tab.
66
+ - name: "Upload artifact"
67
+ uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
68
+ with:
69
+ name: SARIF file
70
+ path: results.sarif
71
+ retention-days: 5
72
+
73
+ # Upload the results to GitHub's code scanning dashboard (optional).
74
+ # Commenting out will disable upload of results to your repo's Code Scanning dashboard
75
+ - name: "Upload to code-scanning"
76
+ uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4
77
+ with:
78
+ sarif_file: results.sarif
@@ -6,6 +6,9 @@ on:
6
6
  pull_request:
7
7
  branches: [ main, develop ]
8
8
 
9
+ permissions:
10
+ contents: read
11
+
9
12
  jobs:
10
13
  test:
11
14
  runs-on: ubuntu-latest
@@ -14,15 +17,15 @@ jobs:
14
17
  python-version: ['3.11', '3.12']
15
18
 
16
19
  steps:
17
- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
20
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4
18
21
 
19
22
  - name: Set up Python ${{ matrix.python-version }}
20
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
23
+ uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v5
21
24
  with:
22
25
  python-version: ${{ matrix.python-version }}
23
26
 
24
27
  - name: Install uv
25
- uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
28
+ uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
26
29
 
27
30
  - name: Install dependencies
28
31
  run: |
@@ -39,7 +42,7 @@ jobs:
39
42
  coverage xml
40
43
 
41
44
  - name: Upload coverage reports to Codecov
42
- uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v4
45
+ uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v4
43
46
  if: matrix.python-version == '3.11'
44
47
  with:
45
48
  file: ./coverage.xml
@@ -41,3 +41,4 @@ build/
41
41
  # OS
42
42
  .DS_Store
43
43
  Thumbs.db
44
+ .envrc
@@ -0,0 +1,18 @@
1
+ repos:
2
+ - repo: https://github.com/gitleaks/gitleaks
3
+ rev: v8.16.3
4
+ hooks:
5
+ - id: gitleaks
6
+ - repo: https://github.com/jumanjihouse/pre-commit-hooks
7
+ rev: 3.0.0
8
+ hooks:
9
+ - id: shellcheck
10
+ - repo: https://github.com/pre-commit/pre-commit-hooks
11
+ rev: v4.4.0
12
+ hooks:
13
+ - id: end-of-file-fixer
14
+ - id: trailing-whitespace
15
+ - repo: https://github.com/pylint-dev/pylint
16
+ rev: v2.17.2
17
+ hooks:
18
+ - id: pylint
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wyzeapy
3
- Version: 0.5.29
3
+ Version: 0.5.31
4
4
  Summary: A library for interacting with Wyze devices
5
5
  Author-email: Katie Mulliken <katie@mulliken.net>
6
6
  License: GPL-3.0-only
7
7
  Requires-Python: >=3.11.0
8
- Requires-Dist: aiodns<4.0.0,>=3.2.0
8
+ Requires-Dist: aiodns<5.0.0,>=3.2.0
9
9
  Requires-Dist: aiohttp<4.0.0,>=3.11.12
10
10
  Requires-Dist: pycryptodome<4.0.0,>=3.21.0
11
11
  Provides-Extra: dev
12
- Requires-Dist: pdoc<16.0.0,>=15.0.3; extra == 'dev'
13
- Requires-Dist: pytest<9.0.0,>=7.0.0; extra == 'dev'
12
+ Requires-Dist: pdoc<17.0.0,>=15.0.3; extra == 'dev'
13
+ Requires-Dist: pytest<10.0.0,>=7.0.0; extra == 'dev'
@@ -23,13 +23,13 @@ from wyzeapy import Wyzeapy
23
23
 
24
24
  async def async_main():
25
25
  client = await Wyzeapy.create()
26
- await client.login("EMAIL", "PASSWORD")
26
+ await client.login(email="EMAIL", password="PASSWORD", key_id="KEY_ID", api_key="API_KEY")
27
27
 
28
28
 
29
29
  if __name__ == "__main__":
30
- loop = asyncio.get_event_loop()
31
- loop.run_until_complete(async_main())
30
+ asyncio.run(async_main())
32
31
  ```
32
+ Note: Visit the [Wyze developer console](https://developer-api-console.wyze.com/#/apikey/view) to generate an Key Id and Api Key.
33
33
 
34
34
  ## Thanks to:
35
35
 
@@ -0,0 +1,79 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ The following versions of Wyzeapy are currently supported with security updates:
6
+
7
+ | Version | Supported |
8
+ | ------- | ------------------ |
9
+ | Latest | :white_check_mark: |
10
+
11
+ ## Reporting a Vulnerability
12
+
13
+ We take the security of Wyzeapy seriously. If you believe you have found a security vulnerability in this project, please report it to us responsibly.
14
+
15
+ ### How to Report
16
+
17
+ **Please do not report security vulnerabilities through public GitHub issues.**
18
+
19
+ Instead, please use one of the following methods:
20
+
21
+ 1. **GitHub Private Vulnerability Reporting (Preferred):** Use GitHub's [private vulnerability reporting feature](https://github.com/SecKatie/wyzeapy/security/advisories/new) to submit your report directly through the repository.
22
+
23
+ 2. **Email:** Send an email to [katie@mulliken.net](mailto:katie@mulliken.net) with the subject line "Wyzeapy Security Vulnerability Report".
24
+
25
+ ### What to Include
26
+
27
+ Please include the following information in your report:
28
+
29
+ - A clear description of the vulnerability
30
+ - Steps to reproduce the issue
31
+ - Affected versions
32
+ - Potential impact of the vulnerability
33
+ - Any suggested fixes or mitigations (optional)
34
+
35
+ ### What to Expect
36
+
37
+ After you submit a vulnerability report:
38
+
39
+ 1. **Acknowledgment:** You will receive an acknowledgment of your report within 48 hours.
40
+
41
+ 2. **Initial Assessment:** Within 7 days, we will provide an initial assessment of the vulnerability and an estimated timeline for a fix.
42
+
43
+ 3. **Resolution Timeline:** We aim to resolve critical vulnerabilities within 30 days and other vulnerabilities within 90 days of the initial report.
44
+
45
+ 4. **Disclosure:** We follow coordinated vulnerability disclosure practices. We will work with you to determine an appropriate disclosure timeline once a fix is available.
46
+
47
+ 5. **Credit:** If you would like to be credited for the discovery, please let us know how you would like to be acknowledged.
48
+
49
+ ### Scope
50
+
51
+ The following are considered in-scope for security vulnerability reports:
52
+
53
+ - Authentication and authorization issues
54
+ - Credential exposure or leakage
55
+ - Injection vulnerabilities
56
+ - Sensitive data exposure
57
+ - Security misconfigurations in the library code
58
+
59
+ The following are generally out of scope:
60
+
61
+ - Issues in third-party dependencies (please report these to the respective maintainers)
62
+ - Issues related to the Wyze API itself (please report these to Wyze)
63
+ - Social engineering attacks
64
+ - Denial of service attacks
65
+
66
+ ## Security Best Practices for Users
67
+
68
+ When using Wyzeapy:
69
+
70
+ - Never commit credentials or API keys to version control
71
+ - Store sensitive configuration in environment variables or secure vaults
72
+ - Keep the library updated to the latest version
73
+ - Review the permissions and scopes requested by your integration
74
+
75
+ ## Contact
76
+
77
+ For security-related inquiries, contact: [katie@mulliken.net](mailto:katie@mulliken.net)
78
+
79
+ For general questions and non-security issues, please use [GitHub Issues](https://github.com/SecKatie/wyzeapy/issues).
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "wyzeapy"
3
- version = "0.5.29"
3
+ version = "0.5.31"
4
4
  description = "A library for interacting with Wyze devices"
5
5
  authors = [
6
6
  { name = "Katie Mulliken", email = "katie@mulliken.net" },
@@ -9,14 +9,14 @@ license = { text = "GPL-3.0-only" }
9
9
  requires-python = ">=3.11.0"
10
10
  dependencies = [
11
11
  "aiohttp>=3.11.12,<4.0.0",
12
- "aiodns>=3.2.0,<4.0.0",
12
+ "aiodns>=3.2.0,<5.0.0",
13
13
  "pycryptodome>=3.21.0,<4.0.0",
14
14
  ]
15
15
 
16
16
  [project.optional-dependencies]
17
17
  dev = [
18
- "pdoc>=15.0.3,<16.0.0",
19
- "pytest>=7.0.0,<9.0.0",
18
+ "pdoc>=15.0.3,<17.0.0",
19
+ "pytest>=7.0.0,<10.0.0",
20
20
  ]
21
21
 
22
22
  [build-system]
@@ -26,6 +26,6 @@ build-backend = "hatchling.build"
26
26
  [dependency-groups]
27
27
  dev = [
28
28
  "ruff>=0.12.3",
29
- "pytest>=7.0.0,<9.0.0",
29
+ "pytest>=7.0.0,<10.0.0",
30
30
  "coverage>=7.9.2",
31
31
  ]
@@ -16,6 +16,7 @@ from .services.lock_service import LockService
16
16
  from .services.sensor_service import SensorService
17
17
  from .services.switch_service import SwitchService, SwitchUsageService
18
18
  from .services.thermostat_service import ThermostatService
19
+ from .services.irrigation_service import IrrigationService
19
20
  from .services.wall_switch_service import WallSwitchService
20
21
  from .wyze_auth_lib import WyzeAuthLib, Token
21
22
 
@@ -50,6 +51,7 @@ class Wyzeapy:
50
51
  self._hms_service = None
51
52
  self._lock_service = None
52
53
  self._sensor_service = None
54
+ self._irrigation_service = None
53
55
  self._wall_switch_service = None
54
56
  self._switch_usage_service = None
55
57
  self._email = None
@@ -442,6 +444,14 @@ class Wyzeapy:
442
444
  self._sensor_service = SensorService(self._auth_lib)
443
445
  return self._sensor_service
444
446
 
447
+ @property
448
+ async def irrigation_service(self) -> IrrigationService:
449
+ """Returns an instance of the irrigation service"""
450
+
451
+ if self._irrigation_service is None:
452
+ self._irrigation_service = IrrigationService(self._auth_lib)
453
+ return self._irrigation_service
454
+
445
455
  @property
446
456
  async def wall_switch_service(self) -> WallSwitchService:
447
457
  """Provides access to the Wyze Wall Switch service.
@@ -52,6 +52,40 @@ def olive_create_get_payload(device_mac: str, keys: str) -> Dict[str, Any]:
52
52
  return {"keys": keys, "did": device_mac, "nonce": nonce}
53
53
 
54
54
 
55
+ def olive_create_get_payload_irrigation(device_mac: str) -> Dict[str, Any]:
56
+ nonce = int(time.time() * 1000)
57
+
58
+ return {"device_id": device_mac, "nonce": str(nonce)}
59
+
60
+
61
+ def olive_create_post_payload_irrigation_stop(
62
+ device_mac: str, action: str
63
+ ) -> Dict[str, Any]:
64
+ nonce = int(time.time() * 1000)
65
+
66
+ return {"device_id": device_mac, "nonce": str(nonce), "action": action}
67
+
68
+
69
+ def olive_create_post_payload_irrigation_quickrun(
70
+ device_mac: str, zone_number: int, duration: int
71
+ ) -> Dict[str, Any]:
72
+ nonce = int(time.time() * 1000)
73
+
74
+ return {
75
+ "device_id": device_mac,
76
+ "nonce": str(nonce),
77
+ "zone_runs": [{"zone_number": zone_number, "duration": duration}],
78
+ }
79
+
80
+
81
+ def olive_create_get_payload_irrigation_schedule_runs(
82
+ device_mac: str,
83
+ ) -> Dict[str, Any]:
84
+ nonce = int(time.time() * 1000)
85
+
86
+ return {"device_id": device_mac, "nonce": str(nonce)}
87
+
88
+
55
89
  def olive_create_post_payload(
56
90
  device_mac: str, device_model: str, prop_key: str, value: Any
57
91
  ) -> Dict[str, Any]: