mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
VCR YR sensor test
This commit is contained in:
@@ -206,7 +206,8 @@ class YrData(object):
|
||||
if self._nextrun is not None and dt_util.utcnow() <= self._nextrun:
|
||||
return
|
||||
try:
|
||||
response = requests.get(self._url)
|
||||
with requests.Session() as sess:
|
||||
response = sess.get(self._url)
|
||||
except requests.RequestException:
|
||||
return
|
||||
if response.status_code != 200:
|
||||
|
||||
Reference in New Issue
Block a user