Skip to content

Commit

Permalink
Update wallbox to 0.6.0 (#110636)
Browse files Browse the repository at this point in the history
* Update wallbox plugin version

Closes #110566

* Fix unit tests failing

* Fix import order

---------

Co-authored-by: Martin Hjelmare <[email protected]>
  • Loading branch information
Javier Fernández and MartinHjelmare authored Feb 15, 2024
1 parent 47cbe8f commit d555f91
Showing 6 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/wallbox/manifest.json
Original file line number Diff line number Diff line change
@@ -6,5 +6,5 @@
"documentation": "https://www.home-assistant.io/integrations/wallbox",
"iot_class": "cloud_polling",
"loggers": ["wallbox"],
"requirements": ["wallbox==0.4.14"]
"requirements": ["wallbox==0.6.0"]
}
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
@@ -2823,7 +2823,7 @@ vultr==0.1.2
wakeonlan==2.1.0

# homeassistant.components.wallbox
wallbox==0.4.14
wallbox==0.6.0

# homeassistant.components.folder_watcher
watchdog==2.3.1
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Original file line number Diff line number Diff line change
@@ -2161,7 +2161,7 @@ vultr==0.1.2
wakeonlan==2.1.0

# homeassistant.components.wallbox
wallbox==0.4.14
wallbox==0.6.0

# homeassistant.components.folder_watcher
watchdog==2.3.1
6 changes: 5 additions & 1 deletion tests/components/wallbox/__init__.py
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@
)
from homeassistant.core import HomeAssistant

from .const import ERROR, STATUS, TTL, USER_ID
from .const import ERROR, REFRESH_TOKEN_TTL, STATUS, TTL, USER_ID

from tests.common import MockConfigEntry

@@ -72,8 +72,10 @@
"data": {
"attributes": {
"token": "fakekeyhere",
"refresh_token": "refresh_fakekeyhere",
USER_ID: 12345,
TTL: 145656758,
REFRESH_TOKEN_TTL: 145756758,
ERROR: "false",
STATUS: 200,
}
@@ -85,8 +87,10 @@
"data": {
"attributes": {
"token": "fakekeyhere",
"refresh_token": "refresh_fakekeyhere",
USER_ID: 12345,
TTL: 145656758,
REFRESH_TOKEN_TTL: 145756758,
ERROR: "false",
STATUS: 404,
}
1 change: 1 addition & 0 deletions tests/components/wallbox/const.py
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@
JWT = "jwt"
USER_ID = "user_id"
TTL = "ttl"
REFRESH_TOKEN_TTL = "refresh_token_ttl"
ERROR = "error"
STATUS = "status"

2 changes: 1 addition & 1 deletion tests/components/wallbox/test_config_flow.py
Original file line number Diff line number Diff line change
@@ -188,7 +188,7 @@ async def test_form_reauth_invalid(hass: HomeAssistant, entry: MockConfigEntry)
with requests_mock.Mocker() as mock_request:
mock_request.get(
"https://user-api.wall-box.com/users/signin",
text='{"jwt":"fakekeyhere","user_id":12345,"ttl":145656758,"error":false,"status":200}',
text='{"jwt":"fakekeyhere","refresh_token": "refresh_fakekeyhere","user_id":12345,"ttl":145656758,"refresh_token_ttl":145756758,"error":false,"status":200}',
status_code=200,
)
mock_request.get(

0 comments on commit d555f91

Please sign in to comment.