Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: alandtse/tesla
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.1.4
Choose a base ref
...
head repository: alandtse/tesla
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dev
Choose a head ref
Loading
Showing with 14,478 additions and 3,364 deletions.
  1. +33 −0 .devcontainer.json
  2. +0 −60 .devcontainer/README.md
  3. +0 −32 .devcontainer/devcontainer.json
  4. +1 −0 .github/ISSUE_TEMPLATE/config.yml
  5. +1 −0 .github/ISSUE_TEMPLATE/feature_request.md
  6. +0 −40 .github/ISSUE_TEMPLATE/issue.md
  7. +81 −0 .github/ISSUE_TEMPLATE/issue_car.yml
  8. +73 −0 .github/ISSUE_TEMPLATE/issue_powerwall.yml
  9. +28 −50 .github/workflows/codeql.yml
  10. +17 −0 .github/workflows/lintpr.yml
  11. +30 −7 .github/workflows/pull.yml
  12. +38 −8 .github/workflows/push.yml
  13. +2 −10 .github/workflows/semantic_release.yml
  14. +9 −1 .gitignore
  15. +47 −13 .pre-commit-config.yaml
  16. +2 −2 .prospector.yml
  17. +35 −0 .vscode/launch.json
  18. +8 −0 .vscode/settings.default.json
  19. +11 −0 .vscode/tasks.json
  20. +2,070 −9 CHANGELOG.md
  21. +3 −3 CONTRIBUTING.md
  22. +66 −7 README.md
  23. +2 −0 {.devcontainer → config}/configuration.yaml
  24. +360 −67 custom_components/tesla_custom/__init__.py
  25. +134 −0 custom_components/tesla_custom/base.py
  26. +288 −28 custom_components/tesla_custom/binary_sensor.py
  27. +153 −0 custom_components/tesla_custom/button.py
  28. +125 −75 custom_components/tesla_custom/climate.py
  29. +190 −218 custom_components/tesla_custom/config_flow.py
  30. +33 −17 custom_components/tesla_custom/const.py
  31. +157 −0 custom_components/tesla_custom/cover.py
  32. +75 −42 custom_components/tesla_custom/device_tracker.py
  33. +25 −0 custom_components/tesla_custom/icons.json
  34. +62 −28 custom_components/tesla_custom/lock.py
  35. +10 −13 custom_components/tesla_custom/manifest.json
  36. +151 −0 custom_components/tesla_custom/number.py
  37. +455 −0 custom_components/tesla_custom/select.py
  38. +651 −80 custom_components/tesla_custom/sensor.py
  39. +177 −0 custom_components/tesla_custom/services.py
  40. +64 −0 custom_components/tesla_custom/services.yaml
  41. +90 −11 custom_components/tesla_custom/strings.json
  42. +132 −80 custom_components/tesla_custom/switch.py
  43. +0 −112 custom_components/tesla_custom/tesla_device.py
  44. +411 −0 custom_components/tesla_custom/teslamate.py
  45. +66 −0 custom_components/tesla_custom/text.py
  46. +17 −4 custom_components/tesla_custom/translations/da.json
  47. +90 −11 custom_components/tesla_custom/translations/en.json
  48. +35 −0 custom_components/tesla_custom/translations/ja.json
  49. +3 −2 custom_components/tesla_custom/translations/no.json
  50. +130 −0 custom_components/tesla_custom/update.py
  51. +11 −0 custom_components/tesla_custom/util.py
  52. +2 −11 hacs.json
  53. +11 −5 info.md
  54. +3,964 −1,593 poetry.lock
  55. +32 −20 pyproject.toml
  56. +20 −0 scripts/develop
  57. +7 −0 scripts/lint
  58. +14 −0 scripts/setup
  59. +0 −1 tests/bandit.yaml
  60. +111 −0 tests/common.py
  61. +8 −0 tests/conftest.py
  62. +10 −0 tests/const.py
  63. 0 tests/mock_data/__init__.py
  64. +329 −0 tests/mock_data/car.py
  65. +503 −0 tests/mock_data/energysite.py
  66. +265 −0 tests/test_binary_sensor.py
  67. +176 −0 tests/test_button.py
  68. +166 −0 tests/test_climate.py
  69. +266 −572 tests/test_config_flow.py
  70. +126 −0 tests/test_cover.py
  71. +50 −0 tests/test_device_tracker.py
  72. +57 −0 tests/test_lock.py
  73. +123 −0 tests/test_number.py
  74. +495 −0 tests/test_select.py
  75. +670 −0 tests/test_sensor.py
  76. +209 −0 tests/test_switch.py
  77. +0 −132 tests/test_tesla_device.py
  78. +212 −0 tests/test_update.py
33 changes: 33 additions & 0 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "Tesla Custom Component",
"image": "mcr.microsoft.com/devcontainers/python:1-3.12",
"postCreateCommand": "sudo scripts/setup",
"appPort": ["9123:8123"],
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"github.vscode-pull-request-github",
"ryanluker.vscode-coverage-gutters",
"ms-python.vscode-pylance",
"ms-python.pylint"
],
"settings": {
"files.eol": "\n",
"editor.tabSize": 4,
"python.pythonPath": "/usr/bin/python3",
"python.analysis.autoSearchPaths": false,
"python.formatting.provider": "black",
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"files.trimTrailingWhitespace": true
}
}
},
"remoteUser": "vscode",
"features": {
"ghcr.io/devcontainers/features/rust:1": {}
}
}
60 changes: 0 additions & 60 deletions .devcontainer/README.md

This file was deleted.

32 changes: 0 additions & 32 deletions .devcontainer/devcontainer.json

This file was deleted.

1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: Feature request
about: Suggest an idea for this project
labels: enhancement
---

**Is your feature request related to a problem? Please describe.**
40 changes: 0 additions & 40 deletions .github/ISSUE_TEMPLATE/issue.md

This file was deleted.

81 changes: 81 additions & 0 deletions .github/ISSUE_TEMPLATE/issue_car.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Telsa Car Issue
description: Create a report to help us improve
labels: ["triage", "car"]
body:
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Before you open a new issue, search through the existing open issues and closed issues to see if others have had the same problem.
options:
- label: I have searched both the existing open issues & recently closed issues and did not find a duplicate of this issue.
required: true
- type: checkboxes
attributes:
label: I have read about the Fleet API and understand I may need to use it
description: Unless you have a Pre-2021 Model S/X the [Fleet API](https://github.com/alandtse/tesla?tab=readme-ov-file#tesla-fleet-api-proxy) will need to be used for all other vehicles in the future.
options:
- label: I understand issues relating to read only commands will be auto closed if not using the Fleet API.
required: true

- type: markdown
attributes:
value: |
Issues not containing the minimum requirements will be closed:
- Issues without a description (using the header is not good enough) will be closed.
- Issues without debug logging will be closed.
- type: input
id: version_hacs
attributes:
label: Version of the Tesla component
description: You can find this under HACS -> Integrations -> Tesla. If you are not using the newest version, download and try that before opening an issue
placeholder: ex. v3.19.3
validations:
required: true
- type: input
id: version_tesla
attributes:
label: Version of the Tesla car software
description: Open the Tesla app -> Select car -> Scroll to bottom
placeholder: ex. 2023.44.1
validations:
required: true
- type: input
id: model_tesla
attributes:
label: Model
description: The model of the Tesla
placeholder: ex. Model 3
validations:
required: true
- type: textarea
attributes:
label: Current Behavior
description: A concise description of what you're experiencing.
validations:
required: true

- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: true

- type: textarea
attributes:
label: Debug logs
description: Enable the debug logs ([In Home Assistant](https://my.home-assistant.io/redirect/integration/?domain=tesla_custom) & click `Enable debug logging`)
render: true
placeholder: |
Your logs here, please follow the instructions above - https://my.home-assistant.io/redirect/integration/?domain=tesla_custom.
validations:
required: true

- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Anything that will give us more context about the issue you are encountering
validations:
required: false
73 changes: 73 additions & 0 deletions .github/ISSUE_TEMPLATE/issue_powerwall.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Powerwall Issue
description: Create a report to help us improve
labels: ["triage", "powerwall"]
body:
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Before you open a new issue, search through the existing open issues and closed issues to see if others have had the same problem.
options:
- label: I have searched both the existing open issues & recently closed issues and did not find a duplicate of this issue.
required: true
- type: markdown
attributes:
value: |
Issues not containing the minimum requirements will be closed:
- Issues without a description (using the header is not good enough) will be closed.
- Issues without debug logging will be closed.
- type: input
id: version_hacs
attributes:
label: Version of the Tesla component
description: You can find this under HACS -> Integrations -> Tesla. If you are not using the newest version, download and try that before opening an issue
placeholder: ex. v3.19.3
validations:
required: true
- type: input
id: version_tesla
attributes:
label: Version of the Powerwall Gateway software
description: Open the Tesla app -> Select powerwall -> Settings -> My Home Info -> Powerwall Gateway Version
placeholder: ex. 23.44.0 eb113390
validations:
required: true
- type: input
id: model_powerwall
attributes:
label: Model
description: The model of the Powerwall
placeholder: ex. 2
validations:
required: true
- type: textarea
attributes:
label: Current Behavior
description: A concise description of what you're experiencing.
validations:
required: true

- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: true

- type: textarea
attributes:
label: Debug logs
description: Enable the debug logs ([In Home Assistant](https://my.home-assistant.io/redirect/integration/?domain=tesla_custom) & click `Enable debug logging`)
render: true
placeholder: |
Your logs here
validations:
required: true

- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Anything that will give us more context about the issue you are encountering
validations:
required: false
Loading