python-openevse-http 0.3.2__py3-none-any.whl → 0.3.3__py3-none-any.whl
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.
- openevsehttp/client.py +1 -1
- openevsehttp/commands.py +6 -2
- {python_openevse_http-0.3.2.dist-info → python_openevse_http-0.3.3.dist-info}/METADATA +1 -1
- {python_openevse_http-0.3.2.dist-info → python_openevse_http-0.3.3.dist-info}/RECORD +7 -7
- {python_openevse_http-0.3.2.dist-info → python_openevse_http-0.3.3.dist-info}/WHEEL +0 -0
- {python_openevse_http-0.3.2.dist-info → python_openevse_http-0.3.3.dist-info}/licenses/LICENSE +0 -0
- {python_openevse_http-0.3.2.dist-info → python_openevse_http-0.3.3.dist-info}/top_level.txt +0 -0
openevsehttp/client.py
CHANGED
|
@@ -139,7 +139,7 @@ class OpenEVSE(CommandsMixin, ManagersMixin, SensorsMixin, PropertiesMixin):
|
|
|
139
139
|
try:
|
|
140
140
|
message = json.loads(message)
|
|
141
141
|
except ValueError:
|
|
142
|
-
_LOGGER.
|
|
142
|
+
_LOGGER.debug("Non JSON response: %s", message)
|
|
143
143
|
|
|
144
144
|
if resp.status == 400:
|
|
145
145
|
if isinstance(message, dict) and "msg" in message:
|
openevsehttp/commands.py
CHANGED
|
@@ -492,6 +492,8 @@ class CommandsMixin:
|
|
|
492
492
|
_LOGGER.error("Problem issuing command: %s", response)
|
|
493
493
|
raise UnknownError
|
|
494
494
|
|
|
495
|
+
self._status["divertmode"] = new_mode
|
|
496
|
+
|
|
495
497
|
async def set_shaper(self, enable: bool = True) -> None:
|
|
496
498
|
"""Set shaper mode."""
|
|
497
499
|
if not self._version_check("4.0.0"):
|
|
@@ -500,16 +502,18 @@ class CommandsMixin:
|
|
|
500
502
|
|
|
501
503
|
url = f"{self.url}shaper"
|
|
502
504
|
mode = 1 if enable else 0
|
|
503
|
-
data = {"
|
|
505
|
+
data = {"shaper": mode}
|
|
504
506
|
|
|
505
507
|
_LOGGER.debug("Setting shaper to %s", mode)
|
|
506
|
-
response = await self.process_request(url=url, method="post",
|
|
508
|
+
response = await self.process_request(url=url, method="post", rapi=data)
|
|
507
509
|
response = self._normalize_response(response)
|
|
508
510
|
msg = response.get("msg") if isinstance(response, Mapping) else None
|
|
509
511
|
if msg not in ["OK", "done", "no change", "Current Shaper state changed"]:
|
|
510
512
|
_LOGGER.error("Problem issuing command: %s", response)
|
|
511
513
|
raise UnknownError
|
|
512
514
|
|
|
515
|
+
self._status["shaper"] = mode
|
|
516
|
+
|
|
513
517
|
async def toggle_shaper(self) -> None:
|
|
514
518
|
"""Toggle shaper mode."""
|
|
515
519
|
shaper_active = self._status.get("shaper")
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
openevsehttp/__init__.py,sha256=I6a1mjOZHYiWb_qfCuDuFLOOncrkkB_7uwybtOIujfY,1165
|
|
2
2
|
openevsehttp/__main__.py,sha256=EHmSdT7GjAVvHQxvLBTjZXsj_V5SB6B2_kpgUAT7mPM,146
|
|
3
|
-
openevsehttp/client.py,sha256=
|
|
4
|
-
openevsehttp/commands.py,sha256=
|
|
3
|
+
openevsehttp/client.py,sha256=JYReKIJLbQbymq_o19-oZgxMyxHwZB6Sc-M6unVfMOo,18208
|
|
4
|
+
openevsehttp/commands.py,sha256=yQMsDHTxPJpwzYB9V4LXhzmKIhFF7zFv0NtpxivBn94,21109
|
|
5
5
|
openevsehttp/const.py,sha256=VSc5Xt-KFenft0rT6ql9whCD7J9g_YvjLYU_PX706eE,1360
|
|
6
6
|
openevsehttp/exceptions.py,sha256=bqz-tHTW1AYJMKcm0s5M6z5tA6XZgjnCiBLW1XrZ_70,672
|
|
7
7
|
openevsehttp/managers.py,sha256=kEX1ZD9u-FY0UEZJsxeFEGBSGzSlkbBc0kmxCiMJtJw,5373
|
|
8
8
|
openevsehttp/properties.py,sha256=Lo2p6WfPuhpaEcIZ0OeAxinHSa0G8Sv2wLZ-dPe7rjo,17181
|
|
9
9
|
openevsehttp/sensors.py,sha256=sJP2FPnU1Lk5S3VUyFT14JM1nKEBQPsjl-DiZI-pZrs,4673
|
|
10
10
|
openevsehttp/websocket.py,sha256=Mi_WFmlT3-9i6bbHIN6ua09SD8CpIle2vRXB3HyWzmM,10066
|
|
11
|
-
python_openevse_http-0.3.
|
|
12
|
-
python_openevse_http-0.3.
|
|
13
|
-
python_openevse_http-0.3.
|
|
14
|
-
python_openevse_http-0.3.
|
|
15
|
-
python_openevse_http-0.3.
|
|
11
|
+
python_openevse_http-0.3.3.dist-info/licenses/LICENSE,sha256=hSB6TOQ7rmwSGb6XzqRjDGMvmUj5_GlacqQin3tegtA,11341
|
|
12
|
+
python_openevse_http-0.3.3.dist-info/METADATA,sha256=jRmVpNx2qlkUs3Py45EPGjwZHT89vzWJzVB3grOl8Iw,4363
|
|
13
|
+
python_openevse_http-0.3.3.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
|
|
14
|
+
python_openevse_http-0.3.3.dist-info/top_level.txt,sha256=u8RUkoEIE33Cjn6gmqiEoVpZ0VZ59WJ3FXBwwOg0CPE,13
|
|
15
|
+
python_openevse_http-0.3.3.dist-info/RECORD,,
|
|
File without changes
|
{python_openevse_http-0.3.2.dist-info → python_openevse_http-0.3.3.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|