diff --git a/homeassistant/components/onvif/camera.py b/homeassistant/components/onvif/camera.py index d623f1d879b..299c9026b0e 100644 --- a/homeassistant/components/onvif/camera.py +++ b/homeassistant/components/onvif/camera.py @@ -516,7 +516,8 @@ class ONVIFHassCamera(Camera): """Read image from a URL.""" try: response = requests.get(self._snapshot, timeout=5, auth=auth) - return response.content + if response.status_code < 300: + return response.content except requests.exceptions.RequestException as error: _LOGGER.error( "Fetch snapshot image failed from %s, falling back to FFmpeg; %s",