'Send commands to API.'

def _push_button(self):

    url = '{}/cc?dkey={}&click=1'.format(self.opengarage_url, self._devicekey)
    try:
        response = requests.get(url, timeout=10).json()
        if (response['result'] == 2):
            _LOGGER.error('Unable    to    control    %s:    device_key    is    incorrect.', self._name)
            self._state = self._state_before_move
            self._state_before_move = None
    except requests.exceptions.RequestException as ex:
        _LOGGER.error('Unable    to    connect    to    OpenGarage    device:    %(reason)s', dict(reason=ex))
        self._state = self._state_before_move
        self._state_before_move = None
