python-openevse-http 1.0.0__tar.gz → 1.0.1__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 (70) hide show
  1. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/.github/workflows/links.yml +1 -1
  2. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/.github/workflows/publish-to-pypi.yml +2 -2
  3. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/.github/workflows/test.yml +3 -3
  4. {python_openevse_http-1.0.0/python_openevse_http.egg-info → python_openevse_http-1.0.1}/PKG-INFO +1 -1
  5. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/openevsehttp/client.py +4 -4
  6. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/openevsehttp/properties.py +6 -3
  7. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1/python_openevse_http.egg-info}/PKG-INFO +1 -1
  8. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/requirements_test.txt +1 -1
  9. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/tests/test_properties.py +2 -2
  10. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/.github/dependabot.yml +0 -0
  11. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/.github/release-drafter.yml +0 -0
  12. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/.github/workflows/autolabeler.yml +0 -0
  13. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/.github/workflows/release-drafter.yml +0 -0
  14. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/.gitignore +0 -0
  15. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/.pre-commit-config.yaml +0 -0
  16. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/.yamllint +0 -0
  17. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/EXTERNAL_SESSION.md +0 -0
  18. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/LICENSE +0 -0
  19. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/README.md +0 -0
  20. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/codecov.yml +0 -0
  21. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/example_external_session.py +0 -0
  22. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/openevsehttp/__init__.py +0 -0
  23. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/openevsehttp/__main__.py +0 -0
  24. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/openevsehttp/commands.py +0 -0
  25. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/openevsehttp/const.py +0 -0
  26. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/openevsehttp/exceptions.py +0 -0
  27. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/openevsehttp/managers.py +0 -0
  28. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/openevsehttp/py.typed +0 -0
  29. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/openevsehttp/sensors.py +0 -0
  30. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/openevsehttp/utils.py +0 -0
  31. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/openevsehttp/websocket.py +0 -0
  32. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/pyproject.toml +0 -0
  33. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/python_openevse_http.egg-info/SOURCES.txt +0 -0
  34. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/python_openevse_http.egg-info/dependency_links.txt +0 -0
  35. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/python_openevse_http.egg-info/not-zip-safe +0 -0
  36. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/python_openevse_http.egg-info/requires.txt +0 -0
  37. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/python_openevse_http.egg-info/top_level.txt +0 -0
  38. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/requirements.txt +0 -0
  39. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/requirements_lint.txt +0 -0
  40. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/setup.cfg +0 -0
  41. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/setup.py +0 -0
  42. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/tests/__init__.py +0 -0
  43. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/tests/common.py +0 -0
  44. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/tests/conftest.py +0 -0
  45. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/tests/fixtures/github_v2.json +0 -0
  46. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/tests/fixtures/github_v4.json +0 -0
  47. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/tests/fixtures/v2_json/config.json +0 -0
  48. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/tests/fixtures/v2_json/status.json +0 -0
  49. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/tests/fixtures/v4_json/config-broken-semver.json +0 -0
  50. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/tests/fixtures/v4_json/config-broken.json +0 -0
  51. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/tests/fixtures/v4_json/config-dev.json +0 -0
  52. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/tests/fixtures/v4_json/config-extra-version.json +0 -0
  53. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/tests/fixtures/v4_json/config-new.json +0 -0
  54. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/tests/fixtures/v4_json/config-unknown-semver.json +0 -0
  55. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/tests/fixtures/v4_json/config.json +0 -0
  56. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/tests/fixtures/v4_json/schedule.json +0 -0
  57. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/tests/fixtures/v4_json/status-broken.json +0 -0
  58. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/tests/fixtures/v4_json/status-new.json +0 -0
  59. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/tests/fixtures/v4_json/status.json +0 -0
  60. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/tests/fixtures/websocket.json +0 -0
  61. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/tests/test_client.py +0 -0
  62. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/tests/test_commands.py +0 -0
  63. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/tests/test_external_session.py +0 -0
  64. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/tests/test_main_edge_cases.py +0 -0
  65. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/tests/test_managers.py +0 -0
  66. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/tests/test_mixins.py +0 -0
  67. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/tests/test_sensors.py +0 -0
  68. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/tests/test_shaper.py +0 -0
  69. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/tests/test_websocket.py +0 -0
  70. {python_openevse_http-1.0.0 → python_openevse_http-1.0.1}/tox.ini +0 -0
@@ -19,7 +19,7 @@ jobs:
19
19
  with:
20
20
  egress-policy: audit
21
21
 
22
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
22
+ - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
23
23
 
24
24
  - name: Link Checker
25
25
  uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2
@@ -25,13 +25,13 @@ jobs:
25
25
  with:
26
26
  egress-policy: audit
27
27
 
28
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
28
+ - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
29
29
  with:
30
30
  ref: ${{ inputs.tag || github.ref }}
31
31
  fetch-depth: 0
32
32
 
33
33
  - name: Install uv
34
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
34
+ uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
35
35
  with:
36
36
  enable-cache: true
37
37
  version: "0.10.9"
@@ -22,7 +22,7 @@ jobs:
22
22
  with:
23
23
  egress-policy: audit
24
24
 
25
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
25
+ - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
26
26
  - name: Set up Python
27
27
  uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
28
28
  with:
@@ -45,7 +45,7 @@ jobs:
45
45
  with:
46
46
  egress-policy: audit
47
47
 
48
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
48
+ - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
49
49
  with:
50
50
  fetch-depth: 2
51
51
  - name: Set up Python ${{ matrix.python-version }}
@@ -74,7 +74,7 @@ jobs:
74
74
  egress-policy: audit
75
75
 
76
76
  - name: Check out the repository
77
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
77
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
78
78
  with:
79
79
  fetch-depth: 2
80
80
  - name: Download coverage data
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python_openevse_http
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: Python wrapper for OpenEVSE HTTP API
5
5
  Home-page: https://github.com/firstof9/python-openevse-http
6
6
  Download-URL: https://github.com/firstof9/python-openevse-http
@@ -50,13 +50,13 @@ class OpenEVSE(CommandsMixin, ManagersMixin, SensorsMixin, PropertiesMixin):
50
50
  def __init__(
51
51
  self,
52
52
  host: str,
53
- user: str = "",
54
- pwd: str = "",
53
+ user: str | None = None,
54
+ pwd: str | None = None,
55
55
  session: aiohttp.ClientSession | None = None,
56
56
  ) -> None:
57
57
  """Connect to an OpenEVSE charger equipped with wifi or ethernet."""
58
- self._user = user
59
- self._pwd = pwd
58
+ self._user = user or ""
59
+ self._pwd = pwd or ""
60
60
  self.url = f"http://{host}/"
61
61
  self._status: dict[str, Any] = {}
62
62
  self._config: dict[str, Any] = {}
@@ -84,9 +84,12 @@ class PropertiesMixin:
84
84
  return bool(self._config.get("relayt", False))
85
85
 
86
86
  @property
87
- def service_level(self) -> int | str | None:
88
- """Return the service level (1, 2, or 'A')."""
89
- return self._config.get("service")
87
+ def service_level(self) -> str | None:
88
+ """Return the service level ('1', '2', or 'A')."""
89
+ value = self._config.get("service")
90
+ if value is None:
91
+ return value
92
+ return str(value)
90
93
 
91
94
  @property
92
95
  def openevse_firmware(self) -> str | None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python_openevse_http
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: Python wrapper for OpenEVSE HTTP API
5
5
  Home-page: https://github.com/firstof9/python-openevse-http
6
6
  Download-URL: https://github.com/firstof9/python-openevse-http
@@ -6,5 +6,5 @@ pytest-timeout==2.4.0
6
6
  pytest-asyncio
7
7
  requests_mock
8
8
  aiohttp
9
- tox==4.55.0
9
+ tox==4.55.1
10
10
  freezegun
@@ -56,8 +56,8 @@ SERVER_URL = "openevse.test.tld"
56
56
  ("test_charger_v2", "ammeter_offset", 0),
57
57
  ("test_charger", "ammeter_scale_factor", 220),
58
58
  ("test_charger_v2", "ammeter_scale_factor", 220),
59
- ("test_charger", "service_level", 2),
60
- ("test_charger_v2", "service_level", 2),
59
+ ("test_charger", "service_level", "2"),
60
+ ("test_charger_v2", "service_level", "2"),
61
61
  # safety checks
62
62
  ("test_charger", "temp_check_enabled", False),
63
63
  ("test_charger_v2", "temp_check_enabled", False),