mirror of
https://github.com/micahqcade/custom_vesync.git
synced 2025-02-11 09:39:00 +01:00
Sourcery refactored main branch (#129)
* 'Refactored by Sourcery' * fix manifest style. --------- Co-authored-by: Sourcery AI <> Co-authored-by: vlebourl <vlebourl@gmail.com>
This commit is contained in:
parent
0a0375c090
commit
eeecfe0dbc
@ -53,12 +53,16 @@ class VeSyncFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
await self.async_set_unique_id(f"{self._username}-{manager.account_id}")
|
||||
self._abort_if_unique_id_configured()
|
||||
|
||||
if not login:
|
||||
return self._show_form(errors={"base": "invalid_auth"})
|
||||
|
||||
return self.async_create_entry(
|
||||
title=self._username,
|
||||
data={CONF_USERNAME: self._username, CONF_PASSWORD: self._password},
|
||||
return (
|
||||
self.async_create_entry(
|
||||
title=self._username,
|
||||
data={
|
||||
CONF_USERNAME: self._username,
|
||||
CONF_PASSWORD: self._password,
|
||||
},
|
||||
)
|
||||
if login
|
||||
else self._show_form(errors={"base": "invalid_auth"})
|
||||
)
|
||||
|
||||
async def async_step_dhcp(self, discovery_info: dhcp.DhcpServiceInfo) -> FlowResult:
|
||||
|
@ -1,17 +1,17 @@
|
||||
{
|
||||
"domain": "vesync",
|
||||
"name": "VeSync",
|
||||
"documentation": "https://www.home-assistant.io/integrations/vesync",
|
||||
"codeowners": ["@markperdue", "@webdjoe", "@thegardenmonkey", "@vlebourl"],
|
||||
"requirements": ["pyvesync==2.1.1"],
|
||||
"config_flow": true,
|
||||
"iot_class": "cloud_polling",
|
||||
"version": "0.2.5",
|
||||
"issue_tracker": "https://github.com/vlebourl/custom_vesync",
|
||||
"dhcp": [
|
||||
{
|
||||
"hostname": "levoit-*",
|
||||
"macaddress": "*"
|
||||
}
|
||||
]
|
||||
],
|
||||
"documentation": "https://www.home-assistant.io/integrations/vesync",
|
||||
"iot_class": "cloud_polling",
|
||||
"issue_tracker": "https://github.com/vlebourl/custom_vesync",
|
||||
"requirements": ["pyvesync==2.1.1"],
|
||||
"version": "0.2.5"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user