def update(self):
        """Update state of sensor."""
        try:
            self.api.update()
        except requests.exceptions.ConnectionError:
            # Error calling the api, already logged in api.update()
            return

        if self.api.status is None:
            _LOGGER.debug("update of %s requested, but no status is available",
                          self._name)
            return

        value = self.api.status.get(self.type)
        if value is None:
            _LOGGER.warning("unable to locate value for %s", self.type)
            return

        if "DownloadRate" in self.type and value not in 0:
            # Convert download rate from bytes/s to mb/s
            self._state = value / 1024 / 1024
        else:
            self._state = value
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/components/sensor/nzbget.py/NZBGetSensor.update/operator `>` -> `not in`