'Initialize the aREST device.'

def __init__(self, arest, resource, name, device_class, pin):

    self.arest = arest
    self._resource = resource
    self._name = name
    self._device_class = device_class
    self._pin = pin
    if (self._pin is not None):
        request = requests.get('{}/mode/{}/i'.format(self._resource, self._pin), timeout=10)
        if (request.status_code != 200):
            _LOGGER.error("Can't    set    mode    of    %s", self._resource)
