'Initialize the switch.'

def __init__(self, resource, location, name, func):

    super().__init__(resource, location, name)
    self._func = func
    request = requests.get('{}/{}'.format(self._resource, self._func), timeout=10)
    if (request.status_code != 200):
        _LOGGER.error("Can't    find    function")
        return
    try:
        request.json()['return_value']
    except KeyError:
        _LOGGER.error('No    return_value    received')
    except ValueError:
        _LOGGER.error('Response    invalid')
