From f7e6b060a7e6b21998bb1c868d41842fe4a6084a Mon Sep 17 00:00:00 2001 From: Aidan Timson Date: Sun, 30 Aug 2020 22:39:33 +0100 Subject: [PATCH] Make onvif username optional (#39415) --- homeassistant/components/onvif/config_flow.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/onvif/config_flow.py b/homeassistant/components/onvif/config_flow.py index fada2d497a7..cbe6d03fa68 100644 --- a/homeassistant/components/onvif/config_flow.py +++ b/homeassistant/components/onvif/config_flow.py @@ -169,14 +169,15 @@ class OnvifFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): self.onvif_config[CONF_PASSWORD] = user_input[CONF_PASSWORD] return await self.async_step_profiles() - # Password is optional and default empty due to some cameras not - # allowing you to change ONVIF user settings. - # See https://github.com/home-assistant/core/issues/35904 + # Username and Password are optional and default empty + # due to some cameras not allowing you to change ONVIF user settings. + # See https://github.com/home-assistant/core/issues/39182 + # and https://github.com/home-assistant/core/issues/35904 return self.async_show_form( step_id="auth", data_schema=vol.Schema( { - vol.Required(CONF_USERNAME): str, + vol.Optional(CONF_USERNAME, default=""): str, vol.Optional(CONF_PASSWORD, default=""): str, } ),