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:
sourcery-ai[bot] 2023-04-18 10:28:14 +02:00 committed by GitHub
parent 0a0375c090
commit eeecfe0dbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 12 deletions

View File

@ -53,12 +53,16 @@ class VeSyncFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
await self.async_set_unique_id(f"{self._username}-{manager.account_id}") await self.async_set_unique_id(f"{self._username}-{manager.account_id}")
self._abort_if_unique_id_configured() self._abort_if_unique_id_configured()
if not login: return (
return self._show_form(errors={"base": "invalid_auth"}) self.async_create_entry(
return self.async_create_entry(
title=self._username, title=self._username,
data={CONF_USERNAME: self._username, CONF_PASSWORD: self._password}, 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: async def async_step_dhcp(self, discovery_info: dhcp.DhcpServiceInfo) -> FlowResult:

View File

@ -1,17 +1,17 @@
{ {
"domain": "vesync", "domain": "vesync",
"name": "VeSync", "name": "VeSync",
"documentation": "https://www.home-assistant.io/integrations/vesync",
"codeowners": ["@markperdue", "@webdjoe", "@thegardenmonkey", "@vlebourl"], "codeowners": ["@markperdue", "@webdjoe", "@thegardenmonkey", "@vlebourl"],
"requirements": ["pyvesync==2.1.1"],
"config_flow": true, "config_flow": true,
"iot_class": "cloud_polling",
"version": "0.2.5",
"issue_tracker": "https://github.com/vlebourl/custom_vesync",
"dhcp": [ "dhcp": [
{ {
"hostname": "levoit-*", "hostname": "levoit-*",
"macaddress": "*" "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"
} }