mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Update Duke Energy package to fix integration (#141669)
* Update Duke Energy package to fix integration * fix tests
This commit is contained in:
parent
ea4ad681e4
commit
7ae397a211
@ -50,10 +50,10 @@ class DukeEnergyConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
_LOGGER.exception("Unexpected exception")
|
||||
errors["base"] = "unknown"
|
||||
else:
|
||||
username = auth["cdp_internal_user_id"].lower()
|
||||
username = auth["internalUserID"].lower()
|
||||
await self.async_set_unique_id(username)
|
||||
self._abort_if_unique_id_configured()
|
||||
email = auth["email"].lower()
|
||||
email = auth["loginEmailAddress"].lower()
|
||||
data = {
|
||||
CONF_EMAIL: email,
|
||||
CONF_USERNAME: username,
|
||||
|
@ -6,5 +6,5 @@
|
||||
"dependencies": ["recorder"],
|
||||
"documentation": "https://www.home-assistant.io/integrations/duke_energy",
|
||||
"iot_class": "cloud_polling",
|
||||
"requirements": ["aiodukeenergy==0.2.2"]
|
||||
"requirements": ["aiodukeenergy==0.3.0"]
|
||||
}
|
||||
|
2
requirements_all.txt
generated
2
requirements_all.txt
generated
@ -225,7 +225,7 @@ aiodiscover==2.6.1
|
||||
aiodns==3.2.0
|
||||
|
||||
# homeassistant.components.duke_energy
|
||||
aiodukeenergy==0.2.2
|
||||
aiodukeenergy==0.3.0
|
||||
|
||||
# homeassistant.components.eafm
|
||||
aioeafm==0.1.2
|
||||
|
2
requirements_test_all.txt
generated
2
requirements_test_all.txt
generated
@ -213,7 +213,7 @@ aiodiscover==2.6.1
|
||||
aiodns==3.2.0
|
||||
|
||||
# homeassistant.components.duke_energy
|
||||
aiodukeenergy==0.2.2
|
||||
aiodukeenergy==0.3.0
|
||||
|
||||
# homeassistant.components.eafm
|
||||
aioeafm==0.1.2
|
||||
|
@ -61,8 +61,8 @@ def mock_api() -> Generator[AsyncMock]:
|
||||
):
|
||||
api = mock_api.return_value
|
||||
api.authenticate.return_value = {
|
||||
"email": "TEST@EXAMPLE.COM",
|
||||
"cdp_internal_user_id": "test-username",
|
||||
"loginEmailAddress": "TEST@EXAMPLE.COM",
|
||||
"internalUserID": "test-username",
|
||||
}
|
||||
api.get_meters.return_value = {}
|
||||
yield api
|
||||
|
Loading…
x
Reference in New Issue
Block a user