'Initialize the binary_sensor.'

def __init__(self, hass, sensor, channel, cam, delay):

    self._hass = hass
    self._cam = cam
    self._sensor = sensor
    self._channel = channel
    if (self._cam.type == 'NVR'):
        self._name = '{}    {}    {}'.format(self._cam.name, sensor, channel)
    else:
        self._name = '{}    {}'.format(self._cam.name, sensor)
    self._id = '{}.{}.{}'.format(self._cam.cam_id, sensor, channel)
    if (delay is None):
        self._delay = 0
    else:
        self._delay = delay
    self._timer = None
    self._cam.camdata.add_update_callback(self._update_callback, self._id)
