'Initialize Raspberry Pi camera component.'

def __init__(self, device_info):

    super().__init__()
    self._name = device_info[CONF_NAME]
    self._config = device_info
    kill_raspistill()
    cmd_args = ['raspistill', '--nopreview', '-o', device_info[CONF_FILE_PATH], '-t', '0', '-w', str(device_info[CONF_IMAGE_WIDTH]), '-h', str(device_info[CONF_IMAGE_HEIGHT]), '-tl', str(device_info[CONF_TIMELAPSE]), '-q', str(device_info[CONF_IMAGE_QUALITY]), '-rot', str(device_info[CONF_IMAGE_ROTATION])]
    if device_info[CONF_HORIZONTAL_FLIP]:
        cmd_args.append('-hf')
    if device_info[CONF_VERTICAL_FLIP]:
        cmd_args.append('-vf')
    subprocess.Popen(cmd_args, stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT)
