Fix vizio bug that occurs when CONF_APPS isn't in config entry… (#33857)
* fix bug when search for string in dict fails when dict is null * another bug fix that I only noticed because of this other bug * add test to cover failure scenario * update docstring * add additional assertions to cover failure scenario that's being fixed
This commit is contained in:
1 parent
df768cab7d
commit
dceb0d9bf7
2 files changed
+36
-2
No files matched your search
@@ -125,8 +125,8 @@ class VizioOptionsConfigFlow(config_entries.OptionsFlow):
|
||||
default_include_or_exclude = (
|
||||
CONF_EXCLUDE
|
||||
if self.config_entry.options
|
||||
and CONF_EXCLUDE in self.config_entry.options.get(CONF_APPS)
|
||||
else CONF_EXCLUDE
|
||||
and CONF_EXCLUDE in self.config_entry.options.get(CONF_APPS, {})
|
||||
else CONF_INCLUDE
|
||||
)
|
||||
options.update(
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user