Commit 837d65e 1 parent f0a5d99 commit 837d65e Copy full SHA for 837d65e
File tree 3 files changed +11
-7
lines changed
3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ async def async_vivint_login(
112
112
113
113
self ._hub = VivintHub (self .hass , user_input )
114
114
try :
115
- await self ._hub .login (load_devices = True )
115
+ await self ._hub .login (load_devices = True , use_cache = False )
116
116
except VivintSkyApiMfaRequiredError :
117
117
return await self .async_step_mfa ()
118
118
except VivintSkyApiAuthenticationError :
Original file line number Diff line number Diff line change @@ -74,17 +74,21 @@ async def _async_update_data() -> None:
74
74
)
75
75
76
76
async def login (
77
- self , load_devices : bool = False , subscribe_for_realtime_updates : bool = False
77
+ self ,
78
+ load_devices : bool = False ,
79
+ subscribe_for_realtime_updates : bool = False ,
80
+ use_cache : bool = True ,
78
81
) -> bool :
79
82
"""Login to Vivint."""
80
83
self .logged_in = False
81
84
82
85
# Get previous session if available
83
86
abs_cookie_jar = aiohttp .CookieJar ()
84
- try :
85
- abs_cookie_jar .load (self .cache_file )
86
- except : # pylint: disable=bare-except
87
- _LOGGER .debug ("No previous session found" )
87
+ if use_cache :
88
+ try :
89
+ abs_cookie_jar .load (self .cache_file )
90
+ except : # pylint: disable=bare-except
91
+ _LOGGER .debug ("No previous session found" )
88
92
89
93
self .session = ClientSession (cookie_jar = abs_cookie_jar )
90
94
Original file line number Diff line number Diff line change 9
9
"iot_class" : " cloud_push" ,
10
10
"issue_tracker" : " https://github.com/natekspencer/hacs-vivint/issues" ,
11
11
"loggers" : [" custom_components.vivint" , " vivintpy" ],
12
- "requirements" : [" vivintpy==2023.3.7 " ],
12
+ "requirements" : [" vivintpy==2023.3.8 " ],
13
13
"version" : " 0.0.0" ,
14
14
"zeroconf" : [" _vivint-ODC300._tcp.local." , " _vivint-DBC350._tcp.local." ]
15
15
}
You can’t perform that action at this time.
0 commit comments