mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Update wallbox to 0.6.0 (#110636)
* Update wallbox plugin version Closes #110566 * Fix unit tests failing * Fix import order --------- Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
47cbe8f00c
commit
d555f91702
@ -6,5 +6,5 @@
|
|||||||
"documentation": "https://www.home-assistant.io/integrations/wallbox",
|
"documentation": "https://www.home-assistant.io/integrations/wallbox",
|
||||||
"iot_class": "cloud_polling",
|
"iot_class": "cloud_polling",
|
||||||
"loggers": ["wallbox"],
|
"loggers": ["wallbox"],
|
||||||
"requirements": ["wallbox==0.4.14"]
|
"requirements": ["wallbox==0.6.0"]
|
||||||
}
|
}
|
||||||
|
@ -2823,7 +2823,7 @@ vultr==0.1.2
|
|||||||
wakeonlan==2.1.0
|
wakeonlan==2.1.0
|
||||||
|
|
||||||
# homeassistant.components.wallbox
|
# homeassistant.components.wallbox
|
||||||
wallbox==0.4.14
|
wallbox==0.6.0
|
||||||
|
|
||||||
# homeassistant.components.folder_watcher
|
# homeassistant.components.folder_watcher
|
||||||
watchdog==2.3.1
|
watchdog==2.3.1
|
||||||
|
@ -2161,7 +2161,7 @@ vultr==0.1.2
|
|||||||
wakeonlan==2.1.0
|
wakeonlan==2.1.0
|
||||||
|
|
||||||
# homeassistant.components.wallbox
|
# homeassistant.components.wallbox
|
||||||
wallbox==0.4.14
|
wallbox==0.6.0
|
||||||
|
|
||||||
# homeassistant.components.folder_watcher
|
# homeassistant.components.folder_watcher
|
||||||
watchdog==2.3.1
|
watchdog==2.3.1
|
||||||
|
@ -25,7 +25,7 @@ from homeassistant.components.wallbox.const import (
|
|||||||
)
|
)
|
||||||
from homeassistant.core import HomeAssistant
|
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
|
from tests.common import MockConfigEntry
|
||||||
|
|
||||||
@ -72,8 +72,10 @@ authorisation_response = {
|
|||||||
"data": {
|
"data": {
|
||||||
"attributes": {
|
"attributes": {
|
||||||
"token": "fakekeyhere",
|
"token": "fakekeyhere",
|
||||||
|
"refresh_token": "refresh_fakekeyhere",
|
||||||
USER_ID: 12345,
|
USER_ID: 12345,
|
||||||
TTL: 145656758,
|
TTL: 145656758,
|
||||||
|
REFRESH_TOKEN_TTL: 145756758,
|
||||||
ERROR: "false",
|
ERROR: "false",
|
||||||
STATUS: 200,
|
STATUS: 200,
|
||||||
}
|
}
|
||||||
@ -85,8 +87,10 @@ authorisation_response_unauthorised = {
|
|||||||
"data": {
|
"data": {
|
||||||
"attributes": {
|
"attributes": {
|
||||||
"token": "fakekeyhere",
|
"token": "fakekeyhere",
|
||||||
|
"refresh_token": "refresh_fakekeyhere",
|
||||||
USER_ID: 12345,
|
USER_ID: 12345,
|
||||||
TTL: 145656758,
|
TTL: 145656758,
|
||||||
|
REFRESH_TOKEN_TTL: 145756758,
|
||||||
ERROR: "false",
|
ERROR: "false",
|
||||||
STATUS: 404,
|
STATUS: 404,
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
JWT = "jwt"
|
JWT = "jwt"
|
||||||
USER_ID = "user_id"
|
USER_ID = "user_id"
|
||||||
TTL = "ttl"
|
TTL = "ttl"
|
||||||
|
REFRESH_TOKEN_TTL = "refresh_token_ttl"
|
||||||
ERROR = "error"
|
ERROR = "error"
|
||||||
STATUS = "status"
|
STATUS = "status"
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@ async def test_form_reauth_invalid(hass: HomeAssistant, entry: MockConfigEntry)
|
|||||||
with requests_mock.Mocker() as mock_request:
|
with requests_mock.Mocker() as mock_request:
|
||||||
mock_request.get(
|
mock_request.get(
|
||||||
"https://user-api.wall-box.com/users/signin",
|
"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,
|
status_code=200,
|
||||||
)
|
)
|
||||||
mock_request.get(
|
mock_request.get(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user