Bump regenmaschine to 2.1.0 (#38649)
parent
353817337e
commit
4cceb4ad0a
|
@ -133,7 +133,7 @@ async def async_setup_entry(hass, config_entry):
|
|||
_verify_domain_control = verify_domain_control(hass, DOMAIN)
|
||||
|
||||
websession = aiohttp_client.async_get_clientsession(hass)
|
||||
client = Client(websession)
|
||||
client = Client(session=websession)
|
||||
|
||||
try:
|
||||
await client.load_local(
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
"""Config flow to configure the RainMachine component."""
|
||||
from regenmaschine import login
|
||||
from regenmaschine import Client
|
||||
from regenmaschine.errors import RainMachineError
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -59,12 +59,12 @@ class RainMachineFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
|||
self._abort_if_unique_id_configured()
|
||||
|
||||
websession = aiohttp_client.async_get_clientsession(self.hass)
|
||||
client = Client(session=websession)
|
||||
|
||||
try:
|
||||
await login(
|
||||
await client.load_local(
|
||||
user_input[CONF_IP_ADDRESS],
|
||||
user_input[CONF_PASSWORD],
|
||||
websession,
|
||||
port=user_input[CONF_PORT],
|
||||
ssl=user_input.get(CONF_SSL, True),
|
||||
)
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
"name": "RainMachine",
|
||||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/rainmachine",
|
||||
"requirements": ["regenmaschine==1.5.1"],
|
||||
"requirements": ["regenmaschine==2.1.0"],
|
||||
"codeowners": ["@bachya"]
|
||||
}
|
||||
|
|
|
@ -1876,7 +1876,7 @@ raspyrfm-client==1.2.8
|
|||
recollect-waste==1.0.1
|
||||
|
||||
# homeassistant.components.rainmachine
|
||||
regenmaschine==1.5.1
|
||||
regenmaschine==2.1.0
|
||||
|
||||
# homeassistant.components.python_script
|
||||
restrictedpython==5.0
|
||||
|
|
|
@ -842,7 +842,7 @@ pyzerproc==0.2.5
|
|||
rachiopy==0.1.3
|
||||
|
||||
# homeassistant.components.rainmachine
|
||||
regenmaschine==1.5.1
|
||||
regenmaschine==2.1.0
|
||||
|
||||
# homeassistant.components.python_script
|
||||
restrictedpython==5.0
|
||||
|
|
|
@ -50,8 +50,7 @@ async def test_invalid_password(hass):
|
|||
flow.context = {"source": SOURCE_USER}
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.rainmachine.config_flow.login",
|
||||
side_effect=RainMachineError,
|
||||
"regenmaschine.client.Client.load_local", side_effect=RainMachineError,
|
||||
):
|
||||
result = await flow.async_step_user(user_input=conf)
|
||||
assert result["errors"] == {CONF_PASSWORD: "invalid_credentials"}
|
||||
|
@ -84,7 +83,7 @@ async def test_step_import(hass):
|
|||
flow.context = {"source": SOURCE_USER}
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.rainmachine.config_flow.login", return_value=True,
|
||||
"regenmaschine.client.Client.load_local", return_value=True,
|
||||
):
|
||||
result = await flow.async_step_import(import_config=conf)
|
||||
|
||||
|
@ -115,7 +114,7 @@ async def test_step_user(hass):
|
|||
flow.context = {"source": SOURCE_USER}
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.rainmachine.config_flow.login", return_value=True,
|
||||
"regenmaschine.client.Client.load_local", return_value=True,
|
||||
):
|
||||
result = await flow.async_step_user(user_input=conf)
|
||||
|
||||
|
|
Loading…
Reference in New Issue