docs: def image_to_file(self, path, get_image=True):
          """Write the image to a file."""
          if not self.image_url or get_image:
              if not self.refresh_image():
                  return False
  
          response = requests.get(self.image_url, stream=True)
  
          if response.status_code != 200:
              _LOGGER.warning(
                  "Unexpected response code %s when requesting image: %s",
                  str(response.status_code), response.text)
              raise AbodeException((ERROR.CAM_IMAGE_REQUEST_INVALID))
  
          with open(path, 'wb') as imgfile:
              copyfileobj(response.raw, imgfile)
  
          return True