@Throttle(MIN_TIME_BETWEEN_UPDATES)
    def update(self):
        try:
            response = requests.get('{}/digital/{}'.format(
                self._resource, self._pin), timeout=10)
            self.data = {'state': response.json()['return_value']}
        except requests.exceptions.ConnectionError:
            _LOGGER.error("No route to device '%s'. Is device offline?",
                          self._resource)
Get the latest data from aREST device.
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/components/binary_sensor/arest.py/ArestData.update